verdammelt / tnef

tnef
GNU General Public License v2.0
58 stars 21 forks source link

can't extract attachment of named chinese charactor #12

Closed sky24987 closed 7 years ago

sky24987 commented 9 years ago

if winmail.dat contained attachments of named chinese charactor ,like "测试.doc" , the file name won't right and can't extract the attachment.

amit777 commented 9 years ago

Could you provide a sample winmail.dat that has this chinese character in it?

darsenlu commented 8 years ago

You might have to convert the file name using the program "convmv"

Here is an example winmail.dat that contains 6 attachments with file names containing Chinese (Traditional) Fonts: https://drive.google.com/file/d/0B2xknhU9o4SSY3JlWXgtbnY1QzA/view?usp=sharing

My Ubuntu system can display Chinese (Unicode) fonts without a problem. However, after extracting winmail.dat using tnef, the output is in Big5 encoding and the file names show up as question marks. Subsequently, I had to convert the file names using "convmv -f big5 -t utf-8 --notest * " (reference: http://blog.longwin.com.tw/2008/07/convmv_utf8_big5_convert_linux_2008/) to fix the problem. If the original attachment is in Simplified Chinese, you may have to do the same thing but specify the simplified Chinese encoding instead of "big5"

Not sure if there is a way for tnef to do this automatically. But so far at least there is a workaround.

verdammelt commented 7 years ago

Closing as stale. (sorry)