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

Filename in ZipPackageEntry not Contains german umlauts

3 Answers 123 Views
ZipLibrary
This is a migrated thread and some comments may be shown as answers.
TaponiaSoftware
Top achievements
Rank 1
TaponiaSoftware asked on 02 Aug 2013, 12:17 PM
Hi,

i got a question using the ZipLibrary.

We got a .zip file with about 20 files zipped.

Some of the filenames contains german umlauts like ä,ö,ü ....

Now, when using the ziplibrary the filenames which got german umlauts are incorrect.

Here is the function to get the files.

Dim fname As String = System.IO.Path.Combine(System.Configuration.ConfigurationManager.AppSettings("GlobalUploadPath"), Filename)
            Dim fs As New FileStream(fname, FileMode.Open, FileAccess.Read)
 
            Try
 
                Using package = ZipPackage.Open(fs)
 
                    Dim allEntries As List(Of ZipPackageEntry) = package.ZipPackageEntries
                    For Each entry As ZipPackageEntry In allEntries
                        Dim filename As String = System.IO.Path.GetFileNameWithoutExtension(entry.FileNameInZip.ToLower)
 
                  -->> wrong filenames in entry.FileNameInZip
 
                        If tableList.Contains(filename) Then
               ' Reading the Data
                        End If
 
                    Next
 
                End Using


Any hint's ?

thank you

3 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 07 Aug 2013, 10:31 AM
Hello TaponiaSoftware,

I have tried to replicate the issue on my side, but without success. Attached you can find the sample project I used for local testing. Please give it a try and let me know whether I miss something.

Regards,
Martin
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
TaponiaSoftware
Top achievements
Rank 1
answered on 08 Aug 2013, 07:11 AM
Hm... i think it´s a kind of localization problem...
See attached screenshot of my function (with same zip package of your example project).

btw:
is there a chance to disable the spellchecker in thread edit window??
Because it wants to check german and if i write english i have to correct each single word.
0
Martin
Telerik team
answered on 09 Aug 2013, 02:54 PM
Hello TaponiaSoftware,

I also suspect that it is some kind of localization issue related to VS encoding settings. You can verify that by inspecting the name of the file after it is saved on the disk.

Another option is to just try to save the umlaute literal into a string variable. If in debug mode the string variable value displays the same as in your image then it would be clear that RadZipLibrary is not involved in the problem.

As to the spell checker - I think you are talking about the browser spell checker that is automatically turned on for some browsers. In FF for example, you can disable it from the context menu as demonstrated in the attached image.

I hope this helps.

Regards,
Martin
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
ZipLibrary
Asked by
TaponiaSoftware
Top achievements
Rank 1
Answers by
Martin
Telerik team
TaponiaSoftware
Top achievements
Rank 1
Share this question
or