Troubles with Unicode

Started by r1cs, August 05, 2006, 11:42:54 AM

Previous topic - Next topic

r1cs

Hello!
When I try to use Unicode with some language (for example, with Russian), I get an unreadable text. My code is:
#include <windows.h>

void start()
{
MessageBoxW(0, L"Hello, World!", NULL, MB_OK);
}

In the MessageBox window the text ("Hello, World!" - in Russian, of course) is totally unreadable. But if I type the text in English, it's all right. If I transfer my code (without any changes) into Visual C++ 6.0, it's all right too - both with Russian and English texts. I try the latest (4.50.90) version of the Pelles C for Windows, but the trouble with Unicode is still existing :(
Can I fix this trouble and how?

Regards,
r1cs

Pelle

I assume it's some kind of code page problem...

Does it help using the C compiler code_page() pragma:
#pragma code_page(number)

where number maybe is 1251 ?!
/Pelle

r1cs

Quote from: "Pelle"Does it help using the C compiler code_page() pragma
It's working! Big thanks! =D>

P.S. I suppose, in the next time I should read the included help before to panic :?

Pelle

Quote from: "r1cs"It's working! Big thanks! =D>
Good news - thanks...

Quote from: "r1cs"P.S. I suppose, in the next time I should read the included help before to panic :?
It might stop me from panic... ;-)
/Pelle