This project is read-only.

ZipSL runtime error - TypeInitializationException due to IBM437 Encoding defaults

Aug 9, 2011 at 6:21 AM


Awesome library! Got up and running in seconds - you've certainly led we customers into the "Pit of Success." :)

This may be already known, but I encountered runtime TypeInitializationException(s) when using types (such as ZipFile and ZipEntry) in ZipSL from with a Silverlight application. After building and running from source, it was clear that the problem was related to the static type construction at lines such as:

AlternateEncoding = System.Text.Encoding.GetEncoding("IBM437");

Appears this encoding is not one of the four supported encodings in SL4. I was able to avoid the issue by altering the behavior where necessary with preprocessor directives, for example:


	AlternateEncoding = System.Text.Encoding.GetEncoding("utf-8");
	AlternateEncoding = System.Text.Encoding.GetEncoding("IBM437");

I was able to do this to the point where my use cases were covered; would be happy to submit a patch if I had some guidance on the most appropriate strategy for dealing with this.


Aug 9, 2011 at 11:56 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.