unicode

G

godhand

Does any here knows how to use unicode in c program to display like
japanese or Russian characters? thanks
 
D

Dan Pop

In said:
Does any here knows how to use unicode in c program to display like
japanese or Russian characters? thanks

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
 
C

cody

you can use wchar_t to gain unicode support (assumed an appropriated font is
installed).
 
C

Christian Bau

"Mike Wahler said:
Really? How? Remember the subject here is
ISO standard C.

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.
 
T

those who know me have no need of my name

in comp.lang.c i read:
you can use wchar_t to gain unicode support (assumed an appropriated font is
installed).

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_10646__
macro.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top