Hello! Thank you for a great product!
I'm using 3.0 build 848 with firefox 3.5.5 and think I have found two bugs, both in the file name decoding from a "content-disposition"-header.
I'm testing with a file name with Swedish characters, encoded in UTF-8: "Teståä.moz".
Quote:
Content-disposition: attachment; filename==?UTF-8?Q?Test=C3=A5=C3=A4.moz?=;
If the file name is encoded with "quoted printable" the file name will be saved as "= UTF-8 Q Tes=C3=A5=C3=A4.moz =". (only the question-marks has been removed)
Quote:
Content-disposition: attachment; filename==?UTF-8?B?VGVzdMOlw6QubW96?=;
If the file name is sent as base64 it works better, but sometimes an extra random character is added . It's like the base64 decoder has a problem with the last char.
Below you find a test php script:
Code:
<?php
#$scheme = "B"; // Base 64 encoded
$scheme = "Q"; // quoted-printable encoding
$filename = "Test\xC3\xA5\xC3\xA4.moz";
$utf8_filename = substr(
iconv_mime_encode (
"" ,
$filename ,
array(
"input-charset"=>"UTF-8",
"output-charset"=>"UTF-8",
"scheme"=>$scheme
)
),
2
);
header("Content-Type: text/plain;");
header("Content-disposition: attachment; filename=$utf8_filename;");
header("Content-transfer-encodig: binary;");
echo "TESTING = $utf8_filename";
?>