Filename in ZipPackageEntry not Contains german umlauts

4 posts, 0 answers
  1. TaponiaSoftware
    TaponiaSoftware avatar
    11 posts
    Member since:
    Jul 2013

    Posted 02 Aug 2013 Link to this post

    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

  2. Martin
    Admin
    Martin avatar
    811 posts

    Posted 07 Aug 2013 Link to this post

    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.
  3. TaponiaSoftware
    TaponiaSoftware avatar
    11 posts
    Member since:
    Jul 2013

    Posted 08 Aug 2013 Link to this post

    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.
  4. Martin
    Admin
    Martin avatar
    811 posts

    Posted 09 Aug 2013 Link to this post

    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.
Back to Top