UndertaleModTool icon indicating copy to clipboard operation
UndertaleModTool copied to clipboard

Special characters from searching do not copy correctly

Open ners-xd opened this issue 1 year ago • 2 comments

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") image

Reproducing steps

  1. Search for code/text that has special characters (the example given uses romanian letters ă, â, î, ș, ț)
  2. 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)

ners-xd avatar Jun 15 '24 20:06 ners-xd

That sounds like a WPF issue at first glance.

Miepee avatar Jul 12 '24 15:07 Miepee

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

luizzeroxis avatar Sep 08 '24 00:09 luizzeroxis

fixed by above PR

Miepee avatar Mar 22 '25 16:03 Miepee