Re: Why use the unicode version of the api?
- From: "Gustavo Echevarria" <g.echevarria@#REMOVETHIS#lantek.es>
- Date: Wed, 7 Dec 2005 14:45:18 +0100
hello again
i've use the ansi version in a dbcs korean system with a string in korean
and sames to functions good. Can someone know what are the problems with
this api 32 unicode funcion? why is necesary to use them in an aplication
programming?
Thanks in advanced
Gustavo Echevarria
"Thorsten Albers" <albersRE@xxxxxxxxxxxxxxxxxxx> escribió en el mensaje
news:01c5eba4$e2b1e380$b38ee684@xxxxxxxxxxx
> Gustavo Echevarria <g.echevarria@#REMOVETHIS#lantek.es> schrieb im Beitrag
> <#UMiMt56FHA.2036@xxxxxxxxxxxxxxxxxxxx>...
>> i have a question regarding the two different versions of the win32 apis
> of
>> some functions. For example RegQueryValueExW and RegQueryValueExA. Can i
> use
>> any of them in a chinesse operation system?. What problems can i have in
>> those dbcs systems?
>
> With the "W" version you will get the Unicode text. With the "A" version
> you will get the Unicode text converted to ANSI text. But: ANSI is a
> character encoding supporting only 255 characters (1 byte per character),
> Unicode uses 2 bytes per character thus supporting at least 65536
> characters (with the so-called surrogates it is more then 65536). For some
> Unicode codepoint ranges the 256 characters are sufficient, but for most
> of
> them they are not since most writing systems are using more then 256
> characters.
> On a japanese and chinese version of windows the ANSI functions do support
> DBCS ANSI strings with a mixture of one or two bytes per character
> (handled
> by the use of so-called lead bytes). But AFAIK this isn't valid for other
> writing systems that are using more then 256 characters, i.e. DBCS with
> "A"
> functions is restricted to japanese and chinese. So, if not used
> explicitely for japanese or chinese writing system strings, using the "A"
> version would result in information loss.
> And DCBS ANSI strings are not easy to handle, Unicode strings clearly are
> the better choice. DCBS is the past, Unicode is the future...
> If you want to use DCBS in your application, of course you should use the
> "A" function versions, or, IMHO better, you should use the "W" versions
> and
> map the Unicode strings with MultiByteToWideChar()/WideCharToMultiByte()
> from or to DBCS ANSI strings.
>
> --
> ----------------------------------------------------------------------
> THORSTEN ALBERS Universität Freiburg
> albers@
> uni-freiburg.de
> ----------------------------------------------------------------------
>
.
- Follow-Ups:
- Re: Why use the unicode version of the api?
- From: Tony Proctor
- Re: Why use the unicode version of the api?
- Prev by Date: Re: How to send mail using VB?
- Next by Date: Re: Why use the unicode version of the api?
- Previous by thread: How to use avicap32.dll
- Next by thread: Re: Why use the unicode version of the api?
- Index(es):
Relevant Pages
|