I believe (although only on the basis of overhearing the conversations
of colleagues) that the zip format doesn't actually specify the
character encoding used for filenames, unfortunately. I think there's
only 8 bits per character though, which makes it impossible to reliably
get proper internationalisation :(
--
Jon Skeet - <sk...@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
But when I use WinZip or WinRar the add the file with Chinsese name into the
zip file,it works just fine.
How do they make it?
Thx.
I suspect they're either using proprietary extensions to the zip file
format, or they're making a "best guess" at the encoding based on which
characters are in the filenames, unfortunately :(
Hi Shrek:
You may try the other zip library for .NET,
http://www.icsharpcode.net/OpenSource/SharpZipLib/Default.aspx
I use it in my application. It can handle Chinese filename without problem.
However, you need to know that the zip file format does not use unicode
code character. All the filename, which are stored into the zip file,
are ANSI MBCS string.
Hence, there is a Unicode(in dotnet) to ANSI MBCS character convertion.
You Windows OS must set to use the Ansi codepage to this character set
to support the convertion by default.
For example, in an English Windows XP OS, I need to set the "Language
for non-Unicode programs" to Chinese(Taiwan) to support the Traditional
Chinese (Big5) filename.
--
Jacky Kwok
jacky@alumni_DOT_cuhk_DOT_edu_DOT_hk
jacky@compose_DOT_com_DOT_hk