Page 1 of 1

Escape Sequence for Special Characters

Posted: Thu May 11, 2023 6:36 pm
by NathanH
Hi,

Is there an escape sequence to place special characters in a text field? Like \33?176 to place the degree character (Chr(176)). Thanks.

NathanH

Re: Escape Sequence for Special Characters

Posted: Fri May 12, 2023 7:40 pm
by plouf
For latin 1 (iso ). \xxx where the decimal point is
I.e \176. In your case

Re: Escape Sequence for Special Characters

Posted: Sat May 13, 2023 8:41 pm
by airsoftsoftwair
NathanH wrote: Thu May 11, 2023 6:36 pm Is there an escape sequence to place special characters in a text field? Like \33?176 to place the degree character (Chr(176)). Thanks.
I don't see why this should be necessary. MUI Royale supports UTF-8 so you can just use the UTF-8 codepoint for the degree character instead of escape sequences or is there any reason why you can't use UTF-8?

Re: Escape Sequence for Special Characters

Posted: Tue May 16, 2023 11:31 pm
by NathanH
Hi,

Yes, I can set it in code after the object is created. I was just wondering whether MUI had the ability to do it at the time of object creation. I guess not. Thanks!

NathanH

Re: Escape Sequence for Special Characters

Posted: Sun May 21, 2023 1:52 pm
by airsoftsoftwair
You can do it at object creation time. You just need to set the character encoding of the XML file to UTF-8, i.e. something like:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
And of course you need to use a text editor capable of saving UTF-8 then. Then these characters should work just fine.