Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
35
Issues with Localized file names
posted

We are evaluating the zip utility and have run into an issue.  I zipped a file called á.txt with windows 7 and tried to unzip it in a silverlight test app.  The filename came back as "�.txt" (the first character is 0xFFFD instead of 0x00E1.

Is there a workaround for this?

 

  • 6759
    Offline posted

    Hi ccifra,

    as Mihail have said the filename is probably not encoded in UTF8 which is the default one for the Compression Library. It is most likely that the filenames in your archive has been encoded with IBM437 code page. You could try to load the zip archive this way:

    var zip = new ZipFile(yourSource, new CodePage437Encoding());

     

    Hope this helps.

     


  • 4666
    posted

    Hi ccifra,

    Could you use when read file one of these ctors:

    ZipFile(Stream stream, System.Text.Encoding encoding)

    or

    ZipFile(byte[] buffer, System.Text.Encoding encoding)

     

    I don't know what utility you use and which encoding is set for the zip files.

     

    Probably the file names are not in UTF (default encoding). In this case you need to specify the encoding. Compression library supports several encodings. If there is not a your one you could implement encoding inheriting Infragistics.CodePageSingleByte class. You could refer documentation how can do that.

     

    Also try to zip and unzip files with the Compression library. Probably in this case you could not have this issue.

     

    Best!

     

    Mihail

     

    Also

    xx