core icon indicating copy to clipboard operation
core copied to clipboard

Encoding GB2312 is not available on Windows.

Open SilentHill opened this issue 8 years ago • 2 comments

Issue Title

Encoding GB2312 is not available on Windows.

General

If we try to use HttpClient.GetString for a GB2312 response, it throws exception. Actually GB2312 encoding is quite important for Chinese developers. Please consider to fix it.

SilentHill avatar Apr 20 '18 03:04 SilentHill

@stdcppdev This is quite known problem in .NET Core because Some codepages needs to be registered. It's quite easy to fix.

If you are using .NET Core 2.0, in your app entry point (such as main), use this:

System.Text.Encoding.RegisterProvider(new CodePagesEncodingProvider())

eriawan avatar Apr 20 '18 04:04 eriawan

@eriawan Yes, it works. Thanks! Close for resolved.

SilentHill avatar Apr 23 '18 22:04 SilentHill