Skip navigation.
Home
The QNX Community Portal

View topic - extra character / editior special character encoding

Page 1 of 1

extra character / editior special character encoding

PostPosted: Fri May 03, 2013 5:50 am
by shravani sunku
HI,

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 .

Regards,
Shravani.

Re: extra character / editior special character encoding

PostPosted: Fri May 03, 2013 6:42 am
by maschoen
shravani sunku wrote:HI,

Im working on HMI QNX 6.5 GF .


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

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 .


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.

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


What editor are you talking about.

Re: extra character / editior special character encoding

PostPosted: Fri May 03, 2013 8:42 am
by shravani sunku
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 ?

Re: extra character / editior special character encoding

PostPosted: Fri May 03, 2013 6:21 pm
by maschoen
shravani sunku wrote: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.

Re: extra character / editior special character encoding

PostPosted: Fri May 17, 2013 9:18 am
by shravani sunku
Thank you,

Im using Editplus as editor .

editor enoding is unicode .

Thanks,
Shravani

Re: extra character / editior special character encoding

PostPosted: Mon May 20, 2013 9:13 pm
by maschoen
It looks like the inserted unicode character is being treated as two different characters. I would try another encoding scheme.

Re: extra character / editior special character encoding

PostPosted: Fri Jun 21, 2013 8:18 am
by _KB_
Hi,
You could try the UTF8 codeof degree sign :

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