From 6529d0565c42b8832859b45a56773d52e1ae8670 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 4 Jan 2021 11:14:20 +0800 Subject: [PATCH] fix: fix wrong text encoding while getting latest release version from Gitee.com --- src/UI/Launcher.xaml.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/UI/Launcher.xaml.cs b/src/UI/Launcher.xaml.cs index b7219f0a..5fe02917 100644 --- a/src/UI/Launcher.xaml.cs +++ b/src/UI/Launcher.xaml.cs @@ -3,6 +3,7 @@ using System.Collections.ObjectModel; using System.ComponentModel; using System.Net; using System.Reflection; +using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Windows; @@ -138,7 +139,7 @@ namespace SourceGit.UI { /// public void CheckUpdate() { try { - var web = new WebClient(); + var web = new WebClient() { Encoding = Encoding.UTF8 }; var raw = web.DownloadString("https://gitee.com/api/v5/repos/sourcegit/SourceGit/releases/latest"); var ver = JsonConvert.DeserializeObject(raw); var cur = Assembly.GetExecutingAssembly().GetName().Version;