Monotouch - ICSharpCode.SharpZipLib giving an error

前端 未结 2 2181
[愿得一人]
[愿得一人] 2021-02-19 16:51

Hy guys,

I\'m trying to generate a Zip File with ICSharpCode.SharpZipLib library but it\'s throwing a really weird error.

Code:

public stati         


        
2条回答
  •  被撕碎了的回忆
    2021-02-19 17:24

    I know this is an old thread, but I just spent an afternoon trying to fix this with monodroid 4.6. On the previous version the trick was to manually add a reference to the I18N and I18N.WEST libraries, but now starting with version 4.6 it doesn't work anymore. :(

    So I applied a fix to the ZipConstants.cs file of SharpZipLib:

    From:

    static int defaultCodePage = Thread.CurrentThread.CurrentCulture.TextInfo.OEMCodePage;
    

    To:

    static int defaultCodePage = System.Text.Encoding.UTF8.CodePage;
    

提交回复
热议问题