468,316 Members | 1,521 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,316 developers. It's quick & easy.

unicode

Does any here knows how to use unicode in c program to display like
japanese or Russian characters? thanks
Nov 13 '05 #1
5 6110
In <be**************************@posting.google.com > in**************@yahoo.com (godhand) writes:
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
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #2
you can use wchar_t to gain unicode support (assumed an appropriated font is
installed).

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
Nov 13 '05 #3
"cody" <do*********************@gmx.de> wrote in message
news:bm************@ID-176797.news.uni-berlin.de...
you can use wchar_t to gain unicode support


Really? How? Remember the subject here is
ISO standard C.

-Mike
Nov 13 '05 #4
In article <D1*****************@newsread3.news.pas.earthlink. net>,
"Mike Wahler" <mk******@mkwahler.net> wrote:
"cody" <do*********************@gmx.de> wrote in message
news:bm************@ID-176797.news.uni-berlin.de...
you can use wchar_t to gain unicode support


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.
Nov 13 '05 #5
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.

--
a signature
Nov 13 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Michael Weir | last post: by
8 posts views Thread by Bill Eldridge | last post: by
8 posts views Thread by Francis Girard | last post: by
4 posts views Thread by webdev | last post: by
2 posts views Thread by Neil Schemenauer | last post: by
10 posts views Thread by Nikolay Petrov | last post: by
6 posts views Thread by Jeff | last post: by
13 posts views Thread by Tomás | last post: by
24 posts views Thread by ChaosKCW | last post: by
1 post views Thread by howard w | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.