Escape Sequence for Special Characters

Discuss GUI programming with the MUI Royale plugin here
Post Reply
NathanH
Posts: 107
Joined: Sun Jul 05, 2015 1:29 am
Location: Caldwell, Idaho

Escape Sequence for Special Characters

Post 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
plouf
Posts: 467
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: Escape Sequence for Special Characters

Post by plouf »

For latin 1 (iso ). \xxx where the decimal point is
I.e \176. In your case
Christos
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Escape Sequence for Special Characters

Post 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?
NathanH
Posts: 107
Joined: Sun Jul 05, 2015 1:29 am
Location: Caldwell, Idaho

Re: Escape Sequence for Special Characters

Post 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
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Escape Sequence for Special Characters

Post 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.
Post Reply