none
sample program for displaying a characters (like dollar symbol ) using unicode in Vc++ RRS feed

  • Question

  • wHi.,

             how to display a special characters using unicodes in vc++..

    for eg.,

    I need output this character Ğ...input is -->u+011e ......(sample program in vc++)....

    Kindly help me .....I need sample program for displaying a special characters using unicode...

     

     

     

    Regards

    Saravanan G

    Monday, August 23, 2010 9:29 AM

All replies

  • _tprintf(_T("%c\n"),0x011E)


    --
    Luca Calligaris (MVP-Windows Embedded)
    lucaDOTcalligarisATeurotechDOTcom
    www.eurotech.com
     
     
    "SaravananGurusamy" <=?utf-8?B?U2FyYXZhbmFuR3VydXNhbXk=?=> ha scritto nel messaggio news:6c98bc57-65fb-4248-b41c-7eeebf1e74ab...

    wHi.,

             how to display a special characters using unicodes in vc++..

    for eg.,

    I need output this character Ğ...input is -->u+011e .......(sample program in vc++)....

    Kindly help me .....I need sample program for displaying a special characters using unicode...

     

     

     

    Regards

    Saravanan G


    Luca Calligaris (MVP-Windows Embedded) lucaDOTcalligarisATeurotechDOTcom www.eurotech.com
    Monday, August 23, 2010 12:44 PM
  • HWND hTextBox = CreateWindow(TEXT("EDIT"), 0, WS_VISIBLE | WS_CHILD | ES_LEFT | WS_TABSTOP | WS_BORDER, 10, 80, 100, 40, hWnd, (HMENU)IDM_TEXT_BOX, hInst, 0);
    SetWindowText(hTextBox, TEXT("\436"));

    or with an MFC CEdit:

    hTextBox.SetWindowTextW(TEXT("\436"));

     

    or a variation on Luca's:

    _tprintf(TEXT("\436");

    Keep in mind that SetWindowText() is setting the entire text, not just adding a single character.  Of course 436 base 8 is the same as 11E base 16.


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    Monday, August 23, 2010 9:09 PM
    Moderator
  • Thanks for your reply ...

     I workout your code it's working in normal program but if i want to display euro symbol like unicode is (u+20ac) not working....

    Its only  working for 8bit unicode but its not working for more than 8 bit (a3,c4,c3 are working  displaying  a corresponding symbols).....

    i refer some documents..based on single /double bytes(i mean utf-8,utf-16,utf-32) different symbol is there.....

     

    for eg.,euro currency symbol how they are encoding ( 0xE2 0x82 0xAC)...

    In My driver program i am enabling a VK_DBE_SBCSCHAR...using above  hexa decimal value how to display a euro currency symbol (using Macros) ?.. 

     

    Wednesday, August 25, 2010 12:20 PM
  •  SetWindowText(hTextBox, TEXT("\u20AC"));

    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    Wednesday, August 25, 2010 2:45 PM
    Moderator
  • Hi .,

                  Thank you Bruce.....

     I tryed in normal application its working .....If i want to write in driver level(Not a application side) to print the special characters will it work? without any external window...

    Here I dont wnt to create any external window... i must display characters in wordpad on  my keypad devices with the help of some macros / uint8 ? is it possible to display the special characters with the help(macros/uint8) of unicodes...

     

    Kindly reply me....

     

     

    Regards

    Saravanan G

    Thursday, August 26, 2010 11:08 AM
  • What is an "external window"?  You keep saying things about using macros, like macros are something special, what do you mean?  What do you mean by "macros / uint8"?

    If this question is about your keypad driver, then you need to understand that your keypad driver is an input device.  It is up to application software to take the input and create an output.  Your driver will not create the output.


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    Thursday, August 26, 2010 11:43 AM
    Moderator