• 0

Unicode


Question

Alright, so I'm working in C++.

I've defined _UNICODE and imported the tchar class.

I basically want to convert the actual hexcode of a character and place it into a wchar_t string say '30A0' from the Katakana character set so I can output it onto the screen.

How would I go about doing this?

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

wchar_t wcMyChar = 0x30A0;

wchar_t* pwcMyChar = L"\x30A0\x0000";

You can generally treat unicode chars the same way as ansi chars, with a few exceptions.

Link to comment
Share on other sites

  • 0

btw i'm using dev-c++

after including iostream, it still says wcout is undeclared and won't compile.

using wprintf, it compiles fine, but it does't print out anything to the screen.

i'm working on a school computer and it has come to my attention that it probably doesn't have support for my language installed so that's prolly the reason for wprintf not working, but i still would like to know my problem with wcout and i'll try working on it at home.

thanks for the help so far.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.