Chinese characters in file names
--[ UxBoD ]--
uxbod at splatnix.net
Fri Nov 11 11:55:35 GMT 2011
am working on a project and have encountered an issue where file names that contain Chinese (Simplified) characters are being mangled when processed by MailScanner. An example is when one requires all attachments to be zipped up. When I examine the zipped file it now contains a file called ?????.doc. I have taken a look at the code and believe it is something to do with how $safename and $unsafename are being generated when the MIME sections are processed. When examaning an email using postcat one sees an attachment with the following name
Content-Disposition: attachment; filename="=?gb2312?B?16u45bLEwc8uXYG9j?=
The first part of the name between the question marks is the character encoding. I wonder whether something in Message.pm should be using the Perl module Encode and then do something like encode('utf-8', $filename).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the MailScanner