diff --git a/PluralKit.Bot/Commands/ImportExport.cs b/PluralKit.Bot/Commands/ImportExport.cs index f189c8f7..99b3e680 100644 --- a/PluralKit.Bot/Commands/ImportExport.cs +++ b/PluralKit.Bot/Commands/ImportExport.cs @@ -47,6 +47,9 @@ public class ImportExport var response = await _client.GetAsync(url); if (!response.IsSuccessStatusCode) throw Errors.InvalidImportFile; + // hacky fix for discord api returning nonsense charsets sometimes + response.Content.Headers.Remove("content-type"); + response.Content.Headers.Add("content-type", "application/json; charset=UTF-8"); data = JsonConvert.DeserializeObject( await response.Content.ReadAsStringAsync(), _settings