Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > unicode

Reply
Thread Tools

unicode

 
 
godhand
Guest
Posts: n/a
 
      10-06-2003
Does any here knows how to use unicode in c program to display like
japanese or Russian characters? thanks
 
Reply With Quote
 
 
 
 
Dan Pop
Guest
Posts: n/a
 
      10-06-2003
In <(E-Mail Removed) > http://www.velocityreviews.com/forums/(E-Mail Removed) (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: (E-Mail Removed)
 
Reply With Quote
 
 
 
 
cody
Guest
Posts: n/a
 
      10-09-2003
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


 
Reply With Quote
 
Mike Wahler
Guest
Posts: n/a
 
      10-10-2003
"cody" <(E-Mail Removed)> wrote in message
news:bm4s8t$ivj6b$(E-Mail Removed)-berlin.de...
> you can use wchar_t to gain unicode support


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

-Mike


 
Reply With Quote
 
Christian Bau
Guest
Posts: n/a
 
      10-10-2003
In article <D1phb.3949$(E-Mail Removed). net>,
"Mike Wahler" <(E-Mail Removed)> wrote:

> "cody" <(E-Mail Removed)> wrote in message
> news:bm4s8t$ivj6b$(E-Mail Removed)-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.
 
Reply With Quote
 
those who know me have no need of my name
Guest
Posts: n/a
 
      10-10-2003
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: os.lisdir, gets unicode, returns unicode... USUALLY?!?!? Jean-Paul Calderone Python 23 11-21-2006 10:25 AM
os.lisdir, gets unicode, returns unicode... USUALLY?!?!? gabor Python 13 11-18-2006 09:23 AM
Unicode digit to unicode string Gabriele *darkbard* Farina Python 2 05-16-2006 01:15 PM
unicode wrap unicode object? ygao Python 6 04-08-2006 09:54 AM
Unicode + jsp + mysql + tomcat = unicode still not displaying Robert Mark Bram Java 0 09-28-2003 05:37 AM



Advertisments