Re: Convert UTF-8 -> ANSI not via UTF-16?
- From: "Mihai N." <nmihai_year_2000@xxxxxxxxx>
- Date: Fri, 26 Jan 2007 12:25:39 -0800
David: you're right... but is ANSI ambiguous, isn't it?
Which ANSI? ANSI/ISO 8859-1? Or other code-pages?
Nope, in the Windows world it is not ambigous at all. It is a misnomer, all
right, but not ambigous.
ANSI = the default system code page.
This means 1252 on English systems, 932 on Japanese ones, and so on.
It is the code page returned by GetACP, or
GetLocaleInfo(LOCALE_IDEFAULTANSICODEPAGE, ...)
Can be changed by changing the default system locale ("Language for non-
Unicode programs") and rebooting
And there is no Windows locale with ISO 8859-1 as ANSI cp (the closest one is
1252, which is a superset of 8859-1). (see the mapping tables at
ftp.unicode.org for the exact differences)
See http://www.mihai-nita.net/glossary.shtml
Or http://blogs.msdn.com/michkap/archive/2005/02/08/369197.aspx
(or search for ANSI and OEM on Michael Kaplan's blog)
I remember some MS-DOS programs that did graphics in text mode; theyNope, DOS used the OEM code page (same as the current Windows console
used some "ANSI" characters with MSB = 1 to do text-mode graphics.
applications).
--
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
.
- Follow-Ups:
- Re: Convert UTF-8 -> ANSI not via UTF-16?
- From: MrAsm
- Re: Convert UTF-8 -> ANSI not via UTF-16?
- References:
- Convert UTF-8 -> ANSI not via UTF-16?
- From: Susan Rice
- Re: Convert UTF-8 -> ANSI not via UTF-16?
- From: MrAsm
- Re: Convert UTF-8 -> ANSI not via UTF-16?
- From: David Wilkinson
- Re: Convert UTF-8 -> ANSI not via UTF-16?
- From: MrAsm
- Convert UTF-8 -> ANSI not via UTF-16?
- Prev by Date: Re: CEdit control
- Next by Date: Re: Convert UTF-8 -> ANSI not via UTF-16?
- Previous by thread: Re: Convert UTF-8 -> ANSI not via UTF-16?
- Next by thread: Re: Convert UTF-8 -> ANSI not via UTF-16?
- Index(es):
Relevant Pages
|