Thread: unicode character recognitions

  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    32

    unicode character recognitions

    i want to write a program which prints the Unicode character equivalent to that code...

    for e.g.
    if i assign '\u0041' to a variable and then print it...then the output should be A

    Is there any compiler which takes \u as an escape sequence and thus understands that hex number following it is the hex code for a unicode character ...

    nd is there any way i can print Unicode character on a windows console using a C program...

  2. #2
    Registered User
    Join Date
    Jan 2008
    Posts
    32

    clearer

    to make myself more clear.../
    i want an equivalent of
    Code:
    var my_var = '\u0041';
    print(my_var);
    //it is a JavaScript code...and will print A

    in C....

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    This is not complete, but shows how you do the part your Java example shows.

    Code:
    #include <wchar.h>
    #include <stdio.h> 
    ...
    wchar_t wc;
    ...
    wc = 0x0041;
    wprintf("%C", wc);
    ...
    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using a character array in a switch question.
    By bajanElf in forum C Programming
    Replies: 10
    Last Post: 11-08-2008, 08:06 AM
  2. how can i read a unicode char from a file ?
    By Meshal in forum C Programming
    Replies: 6
    Last Post: 10-19-2007, 03:27 AM
  3. Direct3D problem
    By cboard_member in forum Game Programming
    Replies: 10
    Last Post: 04-09-2006, 03:36 AM
  4. Where is my UNICODE extended wide character ?
    By intmail in forum Linux Programming
    Replies: 3
    Last Post: 02-15-2006, 10:20 AM
  5. wchar_t type
    By gustavosserra in forum C++ Programming
    Replies: 5
    Last Post: 11-02-2003, 04:49 PM