By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,627 Members | 2,244 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,627 IT Pros & Developers. It's quick & easy.

unicode

P: n/a
Does any here knows how to use unicode in c program to display like
japanese or Russian characters? thanks
Nov 13 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
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.