i18n and string in another locales [charsets],,??

Janice Caron caron800 at googlemail.com
Mon May 5 23:25:41 PDT 2008


2008/5/6  <d-user at puremagic.com>:
> why  d compiler refuse to swallow  strings [char[] or string] in another languages??
>  c/c++  java/c# etc... comiplers/interpreters can  swallow strings  in any charset
>  without complain

D natively uses Unicode. Unicode can be expressed in three ways,
called UTF-8 (which uses chars), UTF-16 (which uses wchars), and
UTF-32 (which uses dchars).

For all other encodings (and incidently, all other encodings are a
/subset/ of Unicode), to need to convert to and from Unicode.

std.encoding knows also about ASCII, Latin-1, and Windows-1252.
std.encoding also provides the EncodingScheme abstract class, from
which additional encodings may be subclassed. That module is still in
its infancy, but if there is any /specific/ encoding you need support
for, let us know.



More information about the Digitalmars-d mailing list