SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Problem with Latin2 encoded filenames

Last post 09-13-2008 3:26 PM by JohnReilly. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 02-11-2007 5:30 PM

    Problem with Latin2 encoded filenames

    Hello

    My system is MS Windows XP prof (Hungarian) 

    If filenames with special charaters like éáöüóí... compress than the process is seccesfull, but the characters change.

    filename "Katalógizáló"  stored as "Katalˇgizßlˇ".

     

    How can I store the correct filenames ?

     

    Filed under: ,
  • 02-12-2007 8:19 AM In reply to

    Re: Problem with Latin2 encoded filenames

    Hi,

    The key is the value for the DefaultCodePage property in ZipConstants class.  912 (ISO8859-2), 852 (OEM Latin II)  are values that might work.

    You can see what you have installed in the language and regional options in your control panel. A fairly complete list of possibilities for Hungary can be found here (http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/admin/r0004565.htm)

    Just for reference what version of #Zip are you using?  The default default value has changed slightly a while ago.

    This command line tool (http://www.geocities.com/licamft/AEX.zip) when run like'aex --showenv' from the command line will give you a good idea of what your operating system is setup for.  That would be interesting to know also.

     hth, -jr-

  • 02-12-2007 11:36 PM In reply to

    Re: Problem with Latin2 encoded filenames

    Thank you for the answer. :)

     This line solve my problem :

    ICSharpCode.SharpZipLib.Zip.ZipConstants.DefaultCodePage = 852; 

     

    Can I read the current CodePage from the CultureInfo or from the CurrentThread? 

     

     

  • 02-13-2007 7:51 AM In reply to

    Re: Problem with Latin2 encoded filenames

    Hi,

    I am not sure actually.  I would have said CurrentThread EOM code page but if thats true I would expect things to work.

    The AEX utility mentioned previously will show the values.  I would still like to what AEX says and also know the version of the library you are using.

     

    hth, -jr-

  • 02-19-2007 9:53 AM In reply to

    • A22
    • Not Ranked
    • Joined on 02-16-2007
    • Posts 4

    Re: Problem with Latin2 encoded filenames

    I've got same problem with Russian symbols. In Windows-1251 russian names were saved incorrectly, CurrentThread.Encoding or CurrentCulture.TextInfo.Encoding - were not able to correct this problem in any cases even selected encodings were cyrillic. So i searched for correct encoding & found ZipLib working with russian symbols on "OEM Russian" = 866.
     866 fixed problem, but this encoding is rarely used, i'm not sure that's correct way to fix problem, so: why ZipLib incorrectly saves russian name in Unicode? In all default encodings suppporting russian (windows-1251, koi8-r etc.)?
  • 08-30-2008 8:46 AM In reply to

    Re: Problem with Latin2 encoded filenames

    Hi, the problem with Russian characters in file names still exists. I was unable to find the very code page. CP 866 doesn't solve the problem. What can I do?
  • 09-02-2008 10:09 PM In reply to

    Re: Problem with Latin2 encoded filenames

    The best thing going forward is to use unicode directly, which you can do by setting the IsUnicodeText property for entries or in the zip entry factory.  That may not be backwards compatible with some archivers and if not you are back to hunt the codepage to make it work.  1251,28595, and 855 are possibilities.

    This may help a little also http://www.microsoft.com/globaldev/reference/WinCP.mspx

    hth, -jr-

  • 09-03-2008 6:19 AM In reply to

    Re: Problem with Latin2 encoded filenames

    Many thanks for your reply. The only following code helped me: private static string ConvertCharacterFromCyrillicToUnicode(char ch) { switch (ch) { case 'А': return "\u00c0"; case 'Б': return "\u00c1"; case 'В': return "\u00c2"; case 'Г': return "\u00c3"; case 'Д': return "\u00c4"; ...
  • 09-05-2008 11:16 AM In reply to

    • sem123
    • Not Ranked
    • Joined on 09-05-2008
    • Posts 1

    Re: Problem with Latin2 encoded filenames

    Can you send me your ICSharpZipLib.dll, please. Thank you. My email- blackheart1986@mail.ru

  • 09-13-2008 3:26 PM In reply to

    Re: Problem with Latin2 encoded filenames

    You can download this yourself from the web site.  The download link is http://www.icsharpcode.net/OpenSource/SharpZipLib/Download.aspx

    hth, -jr-

     

Page 1 of 1 (10 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.