GenieClient / Genie4

.NET 6 Update of Genie
GNU General Public License v3.0
21 stars 14 forks source link

Use UTF-8 instead of UTF-16 BOM LE formatting for maps #166

Open vtcifer opened 10 months ago

vtcifer commented 10 months ago

Currently, genie will READ UTF-8 xml for maps, but will not write it out when saving from the UI. We need to convert it prior to commit to git, or git complains the file format.

I'm pretty sure this is the line that needs changing:

https://github.com/GenieClient/Genie4/blob/f41a5a89728719fef3b4a0896241c840aef80989/Mapper/MapForm.cs#L919

and we just need to tell instead of System.Text.Encoding.Unicode to use System.Text.Encoding.UTF8 or null

https://learn.microsoft.com/en-us/dotnet/api/system.xml.xmltextwriter.-ctor?view=net-8.0#system-xml-xmltextwriter-ctor(system-string-system-text-encoding)