This is a migrated thread and some comments may be shown as answers.

ZipPackage filename encoding issue

1 Answer 91 Views
ZipLibrary
This is a migrated thread and some comments may be shown as answers.
Christoph
Top achievements
Rank 1
Christoph asked on 30 Oct 2013, 07:13 AM
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);
    ms.Dispose();
}
 
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,
Chris

1 Answer, 1 is accepted

Sort by
0
Kiril Vandov
Telerik team
answered on 01 Nov 2013, 01:06 PM
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
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
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 >>
Tags
ZipLibrary
Asked by
Christoph
Top achievements
Rank 1
Answers by
Kiril Vandov
Telerik team
Share this question
or