summaryrefslogtreecommitdiff
path: root/mail/squirrelmail/patches/patch-ai
blob: 862f79b9be8125ab7c69967fd6d888f9219fddda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$NetBSD: patch-ai,v 1.2 2010/03/07 03:41:49 taca Exp $

* Fix encoding problem of attached filenames; convert to Shift_JIS when
  using Internet Explore in Japanese environment, sigh.

--- functions/mime.php.orig	2010-01-30 16:14:53.000000000 +0000
+++ functions/mime.php
@@ -2564,6 +2564,10 @@ function SendDownloadHeaders($type0, $ty
     //set all the Cache Control Headers for IE
     if ($isIE) {
         $filename=rawurlencode($filename);
+        if ($squirrelmail_language == 'ja_JP') {
+            $filename = rawurldecode($filename);
+            $filename = mb_convert_encoding($filename, 'SJIS', 'AUTO');
+        }
         header ("Pragma: public");
         header ("Cache-Control: no-store, max-age=0, no-cache, must-revalidate"); // HTTP/1.1
         header ("Cache-Control: post-check=0, pre-check=0", false);