Jul 1, 2010 at 12:07 PM
Edited Jul 1, 2010 at 12:08 PM
Thank you for your reply.
Yes, I know that Windows archiver doesn't support UTF8, but most of other archivers (7zip, WinRar, etc) do.
I need to be able open the archive on a computer with any locale. That's why UTF8 was chosen.
ProvisionalAlternateEncoding doesn't work in this case.
I have found code in the ZipEnty._GetEncodedFileNameBytes
// workitem 6513: when writing, use the alternative encoding only when ibm437 will not do.
byte result = ibm437.GetBytes(s1);
// need to use this form of GetString() for .NET CF
string s2 = ibm437.GetString(result, 0, result.Length);
_CommentBytes = null;
if (s2 == s1)
After removing this check I got the result I need. But I would like to have nicer and easier way to accomplish this.