Re: How to display "8" correctly in German Os or Regional Setting with German?



<bobbyhsl@xxxxxxxxx> wrote:
I have encountered another question about Unicode char.
See my case1:
Case1:
LPCSTR lpstr = "-=<8";
When I change my regional language form English to German,
the code is
changed to LPCSTR lpstr = "-=<¡Þ". The "8" has been
changed to
wrong characters. The running result of release is also
not correct.

Case2:
CString str(_T("-=<8"));
When I change my regional language form English to German,
the code is
changed to CString str(_T("-=<8"));. The "8" has been
changed to "8".
The running result of release is also not correct.

I just want to display "8" in German environment
correctly. Does any
one know how to solve this problem? Thanks for any
suggestion in
advance.

OK, I found your post in microsoft.public.vc.mfc group. When
you want to post to several groups, don't multipost, but
crosspost. So, all groups will se the same thread.

First of all, if you want to use Unicode character (in this
case: 0x221E, INFINITY), then you need to store it in
appropriate string. You cannot store unicode character in
ANSI string (LPCSTR, as you coded). So, here's the string:

LPCWSTR lpstr = L"-=<\x221E";

or

CStringW str(L"-=<\x221E");

Then, you will need to ensure that the font used for output
is capable of displaying necessary Unicode range. Usually
fonts don't have full Unicode range of characters.


.



Relevant Pages

  • Re: Unicode Support
    ... it is intended that no UNICODE character will ever go ... | same as it would be in ASCII: ... All non-ASCII characters use a multi-byte sequence ...
    (alt.lang.asm)
  • Re: :Oracle unicode problem
    ... a few days ago I got a note dealing with character set problems (with German ... In a Windows environment you have to cope with at least 4 character sets. ... >> characters are not matching. ...
    (perl.dbi.users)
  • Re: Lots of Umlauts
    ... j>> now have a responsibility to type documents in German. ... j>> but I find that it's outrageously difficult to add the j>> German special characters to documents using the "Character j>> Map" utility. ... JS> Try Help on International Characters in Word. ... JS> CTRL key. ...
    (microsoft.public.office.misc)
  • Re: URL: Nova goes belly up in Japan.
    ... quite a bit of German - enough to get the gist of what is going on ... Japan - between my English, Dutch, and JLPT level 3 Japanese I ... had difficulty decoding the characters. ...
    (sci.lang.japan)
  • Re: german special characters in Opera
    ... >> german special characters. ... I am Bosnian and I read bosnian webpages with bosnian ... So german should be no problem. ... Preferences, Fonts, Interface, setting to a different font? ...
    (comp.os.linux)