6 June 2007

Most of the examples in the web displaying Unicode text have the application setting; Character set – Use Unicode Character set. When this setting is applied to the application it starts giving large number of errors. Therefore this setting can not be used

I have found a method to display Japanese text directly inside a function. For that the text is held in wchar_t pointer or WCHAR array. Both methods can be used to display Japanese text but when the text is passed from anther source the text get messed up.

The solution for this problem is to do a cast to LONG data type then cast the whole thing to LPCWSTR data type. This has enabled anyone to directly pass Japanese text to my function;

void Text::displayUnicodeText(wchar_t *txt, int left, int right, int up, int down)

Now the passing parameter is wchar_t pointer time has to be concatenated to this type. This is different to what I had before. Earlier I tried to pass the text as std:wstring type parameter which didn’t work properly.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.