Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SharpZipLib: 1 is not a supported code page

I use SharpZipLib to compress file and user got this error:

1 is not a supported code page

I found here that problem is in regional settings and solution is in

"replace the line of code that fetches the code page from the Thread's OEMCodePage and instead hardcode the suitable value."

But I didn't find any code example to solve this problem.

like image 230
Kirill Avatar asked Oct 26 '17 09:10

Kirill


1 Answers

Line below hardcodes code page to avoid getting it from system regional settings:

ICSharpCode.SharpZipLib.Zip.ZipConstants.DefaultCodePage = 437;
like image 162
5andi5 Avatar answered Nov 02 '22 01:11

5andi5