{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "",
    "ClosedDate": null,
    "CommentCount": 0,
    "Custom": null,
    "Description": "Hi,\n \nAwesome library! Got up and running in seconds - you've certainly led we customers into the \"Pit of Success.\" :)\n \nThis may be already known, but I encountered runtime TypeInitializationException(s) when using types (such as ZipFile and ZipEntry) in ZipSL 1.9.1.8 from with a Silverlight application. After building and running from source, it was clear that the problem\n was related to the static type construction at lines such as:\n \nAlternateEncoding = System.Text.Encoding.GetEncoding(\"IBM437\");\n \n \nAppears this encoding is not one of the \nfour supported encodings in SL4. I was able to avoid the issue by altering the behavior where necessary with preprocessor directives, for example:\n \n \n \n \n#if SILVERLIGHT\n\tAlternateEncoding = System.Text.Encoding.GetEncoding(\"utf-8\");\n#else\n\tAlternateEncoding = System.Text.Encoding.GetEncoding(\"IBM437\");\n#endif\n \nI 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.\n \nYours,\nDavid",
    "LastUpdatedDate": "2014-06-18T08:41:39.4-07:00",
    "PlannedForRelease": "",
    "ReleaseVisibleToPublic": false,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2011-08-09T03:56:57.833-07:00",
    "Status": {
      "Name": "Proposed",
      "Id": 1
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "ZipSL runtime error - TypeInitializationException due to IBM437 Encoding defaults",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 20,
    "Id": 14049
  },
  "FileAttachments": [
    {
      "FileId": 4244,
      "FileName": "DotNetZip.1.9.1.8.zip",
      "DownloadUrl": ".\\4244"
    }
  ],
  "Comments": [
    {
      "Message": "Code does not work without this patch. It appears Silverlight only has the UTF-8 codepages available.\r\n\r\nhttp://msdn.microsoft.com/en-us/library/system.text.encoding(v=vs.95).aspx",
      "PostedDate": "2011-08-23T15:27:59.533-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2011-08-25T12:06:34.173-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2011-08-29T04:07:46.087-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2011-08-30T23:40:17.533-07:00",
      "Id": -2147483648
    },
    {
      "Message": "This currently is a showstopper for me in using Silverlight for a project. Not sure why this is a low impact as it would seem to be to affect anyone that desires to use the Silverlight branch of the code wouldn't it?\r\n\r\nI tried the above fix and was unable to get it to run. It would throw exceptions in ZipFile.Read.cs:\r\n\r\n        private static uint ReadFirstFourBytes(Stream s)\r\n        {\r\n            uint datum = (uint)Ionic.Zip.SharedUtilities.ReadInt(s); <----throwing error IBM437\r\n            return datum;\r\n        }\r\n\r\nMy SL app just needs to read ZIP files if someone could point me in the right direction to resolve this error.",
      "PostedDate": "2011-08-30T23:51:45.497-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2011-08-31T09:23:29.26-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2011-10-14T15:29:13.537-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2011-12-07T01:00:28.473-08:00",
      "Id": -2147483648
    },
    {
      "Message": "There is some extra info about the ProvisionalAlternateEncoding here : http://cheeso.members.winisp.net/DotNetZipHelp/html/aecbb638-1ecf-807e-b933-5bb1a2a95e81.htm\r\nI think I will go with the fix proposed by David - please let us know if you are aware of any possible side effects.\r\n\r\nCheers,\r\nAlex",
      "PostedDate": "2011-12-07T01:23:11.88-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2011-12-08T03:01:01.407-08:00",
      "Id": -2147483648
    },
    {
      "Message": "Patch 11097 will replace all of the IBM437 encoding with UTF8 for SilverLight projects.",
      "PostedDate": "2011-12-19T08:14:35.317-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2011-12-20T01:32:43.43-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2012-02-14T10:25:18.353-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2012-02-14T18:59:02.28-08:00",
      "Id": -2147483648
    },
    {
      "Message": "Would be great to have a fix... just wondering if anyone succeeded with fixing it?",
      "PostedDate": "2012-02-14T19:01:07.917-08:00",
      "Id": -2147483648
    },
    {
      "Message": "I uploaded a patch that should allow you to recompile DotnetZip and use it with Silverlight 4 and .NET 4 projects: http://dotnetzip.codeplex.com/SourceControl/list/patches patch 11486.\r\nI am using this in a project that is currently under heavy use so this solution works for me.",
      "PostedDate": "2012-02-15T02:24:10.443-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2012-02-15T02:32:24.793-08:00",
      "Id": -2147483648
    },
    {
      "Message": "To simplify things even more here are my recompiled DotNetZip 1.9.1.8 files. CAUTION: it works for us , I cannot guarantee it will work for you",
      "PostedDate": "2012-02-15T02:32:26.557-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2012-02-25T03:36:24.037-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2012-07-04T01:27:36.457-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-01-08T07:58:22.56-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-02-21T18:43:06.297-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-03-11T06:22:04.153-07:00",
      "Id": -2147483648
    },
    {
      "Message": "Just adding some support for this patch, would love to get it in the next release. ",
      "PostedDate": "2013-03-19T04:39:43.883-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-07-27T20:29:26.8-07:00",
      "Id": -2147483648
    },
    {
      "Message": "Why is the impact of this issue low? It breaks the whole library on the Silverlight platform.",
      "PostedDate": "2013-10-21T06:13:17.007-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-11-07T08:47:34.19-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2014-01-24T01:57:44.78-08:00",
      "Id": -2147483648
    },
    {
      "Message": "The same issue occurs if the library is used in a Unity-project (which uses the Mono runtime). The unzipping works using the emulator (on Windows) but it fails on an Android device.\nAs this is a showstopper for some people, I hope that the patch proposed by alexpop will be included soon. This issue was reported almost 3 years ago.",
      "PostedDate": "2014-04-28T01:48:00.54-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2014-06-18T08:41:39.4-07:00",
      "Id": -2147483648
    }
  ]
}