Skip to content

Commit

Permalink
Fix encoding in UpdateChecker
Browse files Browse the repository at this point in the history
  • Loading branch information
HMBSbige committed May 9, 2019
1 parent 5e56f86 commit a15e8f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion shadowsocks-csharp/Controller/UpdateChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System;
using System.Dynamic;
using System.Net;
using System.Text;

namespace Shadowsocks.Controller
{
Expand Down Expand Up @@ -44,7 +45,7 @@ public void CheckUpdate(Configuration config, bool notifyNoFound = true)
{
try
{
var http = new WebClient();
var http = new WebClient { Encoding = Encoding.UTF8 };
http.Headers.Add(@"User-Agent", string.IsNullOrEmpty(config.proxyUserAgent) ? USER_AGENT : config.proxyUserAgent);
if (UseProxy)
{
Expand Down

0 comments on commit a15e8f2

Please sign in to comment.