Special characters from searching do not copy correctly
Describe the bug
When you search for something that happens to have special characters, they do not paste correctly when you copy them. For example the text I get from the following image is:
Line 1940: global.msg[0] = stringsetloc("* (E bine sa economise?ti apa.)/%", "scr_text_slash_scr_text_gml_2219_0")
Reproducing steps
- Search for code/text that has special characters (the example given uses romanian letters ă, â, î, ș, ț)
- Try to copy said text and paste it anywhere
Setup Details
- I used the latest version of UTMT as of June 15th 2024 (updated to latest commit)
- OS is Windows 11 Pro 22631.3737
- Game is DELTARUNE Chapter 1&2 (though this does not matter)
That sounds like a WPF issue at first glance.
The problem is this line (and the similar one below):
https://github.com/UnderminersTeam/UndertaleModTool/blob/9f4f13a52495f82663dd125c0028519850faba83/UndertaleModTool/Windows/ClickableTextOutput.xaml.cs#L284
Should be changed to:
Clipboard.SetText(outText);
So it defaults to DataFormats.UnicodeText.
#1905 fixes this anyway
fixed by above PR