I am trying to use the DotNetZip library in my Monodroid app. Everything seems to work fine when I enable the Shared Runtime build option. When I disable Shared Runtime, the line
static System.Text.Encoding ibm437 = System.Text.Encoding.GetEncoding("IBM437");
generates an Exception (Encoding name 'IBM437' not supported). I've checked every box in the "Additional Supported Encodings" list, but it does not seem to help. Anyone have any ideas?
I had the exact same problem.
First, make sure that you've added the "West" encoding in the project properties:
Xamarin Internationalization
If that doesn't do the trick, the problem is that the needed dlls are not getting copied to the .apk's assemblies folder. This should happen automatically, but it doesn't. I filed a bug, so you can see if it's been fixed:
Mono for Android / Xamarin Bugzilla
If not, here is a workaround that worked for me (from Xamarin):
Add the following dummy code to get the 2 dlls added to the .apk
var ignore = new I18N.West.CP437();
Make sure that 'Linking' is set to 'None'
Hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With