wxwidgets - wxStaticText inconsistently displays 'degree' character -


in same application have 2 different instances of wxstatictext. each displays angular value expressed in degrees. i've tested both instances font name , font encoding. same both. i've tested both strings passed setlabel() using same character value, decimal 176. yet 1 displays 'degree' character (small circle, high) expected , other instead displays odd character i'm not familiar with. how can be? there other property of wxstatictext need test?

i can't explain you're seeing because 2 identical controls must behave in same way, can tell using decimal 176 not way encode degree sign, unless explicitly use wxconviso8859_1 create corresponding wxstring.

it better use wxstring::fromutf8("\xc2\xb0") instead or, preferably, make sure source files utf-8 encoded , use wxstring::fromutf8("°").


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -