ZipPackage filename encoding issue

2 posts, 0 answers
  1. Christoph
    Christoph avatar
    1 posts
    Member since:
    Oct 2013

    Posted 30 Oct 2013 Link to this post

    Hey together,

    I've got a little problem with the ZipPackage in the Telerik.Windows.Zip library.

    I'm developing in a Silverlight environment (Silverlight Business Application). On the server side I zip a user specified amount of files (which are stored in a Microsoft SQL database).

    At first a little code snippet:

    MemoryStream ms = new MemoryStream();
    byte[] zip = null;
    using ( ZipPackage zipfile = ZipPackage.Create(ms) ) {
        foreach ( var kvp in files ) {
            zipfile.AddStream(new MemoryStream(kvp.Value), kvp.Key, ZipCompression.Default, DateTime.Now);
        zip = new byte[(int) ms.Length];
        ms.Seek(0, SeekOrigin.Begin);
        ms.Read(zip, 0, (int) ms.Length);
    return zip;

    As you can see, I store the ZipPackage in a MemoryStream. After the "using" code block I return the content of the MemoryStream (ms) back to the client side of my application (the above procedure is called due to an InvokeOperation). On the client side, the returned byte array will be stored under a user specified filename in the local file system. This works really proper, but after opening the stored zip file, I see, that filenames (containing german umlauts like ä, ö, ü) are not well encoded.

    For example:
    A filename in the database is called "Aufsätze.docx". After storing this file with this filename in the zippackage and save the file on my hard disk, the filename is called "Aufs+ñtze.docx".

    I've tried a lot with encoding ... default, utf8, etc. but nothing works.

    Do you have an idea, what else I can do or try? If you need more information or code snippets, please let me know it.

    Kind regards,
  2. Kiril Vandov
    Kiril Vandov avatar
    323 posts

    Posted 01 Nov 2013 Link to this post

    Hello Christoph,

    You are right for the behavior of the RadZipLibrary control, where a file name contains characters such as (german umlauts like ä, ö, ü). Please note that we have already logged it in our PITS and you could track its progress here. Please stay tuned for any changes regarding the issue.

    Please accept our apology for the inconvenience caused.

    Kind regards,
    Kiril Vandov
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top