1
0
mirror of synced 2024-11-28 09:20:57 +01:00

Fix xml encoding when compiling back

This commit is contained in:
KillzXGaming 2020-02-16 12:14:36 -05:00
parent c627bc3c1a
commit f3b1d0e706

View File

@ -789,7 +789,11 @@ namespace FirstPlugin
if (IsXML)
FileFormat.BymlData = XmlByamlConverter.FromXML(textEditor.GetText());
else if (IsOldXML)
FileFormat.BymlData = XmlConverter.ToByml(textEditor.GetText());
{
byte[] TextData = Encoding.Unicode.GetBytes(textEditor.GetText());
StreamReader t = new StreamReader(new MemoryStream(TextData), Encoding.GetEncoding(932));
FileFormat.BymlData = XmlConverter.ToByml(t.ReadToEnd());
}
else
FileFormat.BymlData = YamlByamlConverter.FromYaml(textEditor.GetText());
}