* version of IE. I don't know if it works with Opera, but it should now.
*/
function DumpHeaders($type0, $type1, $filename, $force) {
- global $HTTP_USER_AGENT;
+ global $HTTP_USER_AGENT, $squirrelmail_language;
$isIE = 0;
if (strstr($HTTP_USER_AGENT, 'compatible; MSIE ') !== false &&
$isIE6 = 1;
}
+ if ($squirrelmail_language == 'ja_JP') {
+ if (strstr($HTTP_USER_AGENT, 'Windows') !== false ||
+ strstr($HTTP_USER_AGENT, 'Mac_') !== false) {
+ $filename = mb_convert_encoding($filename, 'SJIS', 'AUTO');
+ } else {
+ $filename = mb_convert_encoding($filename, 'EUC-JP', 'AUTO');
+ }
+ } else {
$filename = ereg_replace('[^-a-zA-Z0-9\.]', '_', $filename);
+ }
// A Pox on Microsoft and it's Office!
if (! $force) {