In <be17859f.03100 60203.1bbcd670@ posting.google. com> infamous_godhan d@yahoo.com (godhand) writes:
[color=blue]
>Does any here knows how to use unicode in c program to display like
>japanese or Russian characters? thanks[/color]
For a C99 implementation, use UCN's. For a C89 implementation, read the
documentation. Both standards require printf to handle multibyte
characters in its format string.
Note, however, that neither standard requires the execution character
set to support Unicode.
Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Dan.Pop@ifh.de
"cody" <dont.spam.me.d eutronium@gmx.d e> wrote in message
news:bm4s8t$ivj 6b$1@ID-176797.news.uni-berlin.de...[color=blue]
> you can use wchar_t to gain unicode support[/color]
Really? How? Remember the subject here is
ISO standard C.
In article <D1phb.3949$av5 .3488@newsread3 .news.pas.earth link.net>,
"Mike Wahler" <mkwahler@mkwah ler.net> wrote:
[color=blue]
> "cody" <dont.spam.me.d eutronium@gmx.d e> wrote in message
> news:bm4s8t$ivj 6b$1@ID-176797.news.uni-berlin.de...[color=green]
> > you can use wchar_t to gain unicode support[/color]
>
> Really? How? Remember the subject here is
> ISO standard C.[/color]
typedef unsigned short Unicode;
looks quite useful to handle 16 bit unicode. As an alternative, use UTF8
encoding. That way, you can use all the plain C char* functions, as long
as you remember that for example strlen () will return the number of
bytes in a string, which will usually not be the same as the number of
unicodes which will not be the same as the number of characters.
in comp.lang.c i read:
[color=blue]
>you can use wchar_t to gain unicode support (assumed an appropriated font is
>installed).[/color]
no, you only get wide-character support. it *may* be unicode. or it may
be something else. just what is provided is implementation defined. there
is a way for the implementation to signal that it does in fact provide
unicode support via the wide-character paradigm, the __STDC_ISO_1064 6__
macro.
Comment