unicode

Discussion in 'C Programming' started by godhand, Oct 6, 2003.

  1. godhand

    godhand Guest

    Does any here knows how to use unicode in c program to display like
    japanese or Russian characters? thanks
     
    godhand, Oct 6, 2003
    #1
    1. Advertising

  2. godhand

    Dan Pop Guest

    In <> (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:
     
    Dan Pop, Oct 6, 2003
    #2
    1. Advertising

  3. godhand

    cody Guest

    cody, Oct 10, 2003
    #3
  4. godhand

    Mike Wahler Guest

    "cody" <> wrote in message
    news:bm4s8t$ivj6b$-berlin.de...
    > you can use wchar_t to gain unicode support


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

    -Mike
     
    Mike Wahler, Oct 10, 2003
    #4
  5. In article <D1phb.3949$>,
    "Mike Wahler" <> wrote:

    > "cody" <> wrote in message
    > news:bm4s8t$ivj6b$-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.
     
    Christian Bau, Oct 10, 2003
    #5
  6. 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
     
    those who know me have no need of my name, Oct 10, 2003
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert Mark Bram
    Replies:
    0
    Views:
    3,991
    Robert Mark Bram
    Sep 28, 2003
  2. ygao

    unicode wrap unicode object?

    ygao, Apr 8, 2006, in forum: Python
    Replies:
    6
    Views:
    580
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Apr 8, 2006
  3. Gabriele *darkbard* Farina

    Unicode digit to unicode string

    Gabriele *darkbard* Farina, May 16, 2006, in forum: Python
    Replies:
    2
    Views:
    545
    Gabriele *darkbard* Farina
    May 16, 2006
  4. gabor
    Replies:
    13
    Views:
    578
    Leo Kislov
    Nov 18, 2006
  5. Jean-Paul Calderone
    Replies:
    23
    Views:
    714
    Leo Kislov
    Nov 21, 2006
Loading...

Share This Page