Monotouch - ICSharpCode.SharpZipLib giving an error

前端 未结 2 2180
[愿得一人]
[愿得一人] 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:08

    MonoTouch removes I18N codepages that it cannot statically determine that you need. You can force monotouch to keep the needed codepage collection (West) in this case one of two ways:

    1. Click Project->[ProjectName] Options
    2. Select iPhone Build
    3. You have two options at this point a. Select "west" from the I18n assemblies list b. Add "-i18n=west" to "Extra Arguments"

    NOTE: You will need to perform step #3 for every combination of configurations and platforms.

    0 讨论(0)
  • 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;
    
    0 讨论(0)
提交回复
热议问题