Mono cannot load 437 encoding

To distribute our application without requiring the user to set the mono framework, we use MonoKickstart to dynamically link Mono libraries at run time. We use the Ionic.Zip library to extract the archive when the application starts. By default, this library uses the IBM437 encoding. However, it cannot load this encoding, as can be seen from the following exception:

System.NotSupportedException: No data is available for encoding 437.
    at System.Text.Encoding.GetEncoding (Int32 codepage) <0x10a0d9970 + 0x0076e> in <filename unknown>:0

This encoding is statically initialized by default, so although we specify a different encoding, an exception still occurs.

If we include the libraries I18N.dll and I18N.West.dll in a dynamically loaded library, the following exception will occur:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidProgramException: Invalid IL code in I18N.Common.Manager:get_PrimaryManager (): IL_0000: ret       
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) <0x11b3340e0 + 0x000bb> in <filename unknown>:0 
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) <0x11b3340e0 + 0x00139> in <filename unknown>:0 
at System.RuntimeType.InvokeMember (System.String name, BindingFlags bindingFlags, System.Reflection.Binder binder, System.Object target, System.Object[] providedArgs, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, System.String[] namedParams) <0x11b332300 + 0x011b7> in <filename unknown>:0 
at System.Text.EncodingHelper.InvokeI18N (System.String name, System.Object[] args) <0x11b32fa10 + 0x00317> in <filename unknown>:0 
at System.Text.Encoding.GetEncoding (Int32 codepage) <0x111378970 + 0x00671> in <filename unknown>:0

, .

, , - ( ).

DLL, :

Ionic.Zip.Reduced.dll
Mono.Posix.dll
Mono.Security.dll
mscorlib.dll
System.Configuration.dll
System.Core.dll
System.Data.dll
System.dll
System.Drawing.dll
System.Net.dll
System.Numerics.dll
System.Runtime.Serialization.dll
System.Security.dll
System.Xml.dll
System.Xml.Linq.dll
WindowsBase.dll
+4
1

:

Xamarin.Mac "System.NotSupportedException: 437" . , , Ionic.Zip.ZipFile, .

, Xamarin.Mac, Mac Build > :

Mac , iOS. , , Debug, Release ( ).

+6

All Articles