extra character / editior special character encoding


Im working on HMI QNX 6.5 GF .

While adding strings , for some special charcters like °F , when we give this special character , it should be appended with °F in file to work and screen displays on °F .

Is this editor encoding issue ? will different encoding introduces any extra character in string ?

please let me know .


It’s hard to know what you are talking about. What is HMI? Is GF the Graphics Foundation?

Adding strings to what? What special character are you talking about. It looks like a degree sign followed by an F. The A with accent is also a special character. What file are you talking about, and what does work mean in this context. I’d be happy to try to help if you say something coherent.

What editor are you talking about.

Im working on Human Machine Interface which is based on Graphics frameoworks .
Graphical framework is supported by QNX 6.5 .

Im editing string in Editplus editor and saving it in a text format .

ex string : " Water is boiling at 100 °F "

after compilation , when opened text file , following string is displayed

" Water is boiling at 100 °F "

How did  got introduced … is this editior encoding issue ?

Thanks, much easier to understand now. Any reason that you are trying to build an application directly on top of GF? Most users use something else, eg. Photon/Qt/OpenGL.

What exactly is the code that is trying to display the string? Also, what exactly is the encoding of the degree symbol? Is it Unicode, or UT8? What editor did you use to build the string.

I think you are on the right track as to it being an encoding issue.

Thank you,

Im using Editplus as editor .

editor enoding is unicode .


It looks like the inserted unicode character is being treated as two different characters. I would try another encoding scheme.

You could try the UTF8 codeof degree sign :

#define CELSIUS_SIGN ("\xC2\xB0") /**< UTF8 code  */
snprintf(buffer, size, "%sF", CELSIUS_SIGN);