Hi!

I am having problems creating an app which understands UTF-8.

I have defined with #define UNICODE/_UNICODE in the beginning.
I have changed from char to TCHAR and so on.
I am starting with wWinMain instead of WinMain.
I am using #pragma code_page(65001) for menues etc in different languages.

I am building with Borland

If anyone is interested...
bcc32.exe -tW -WU -DUNICODE -D_UNICODE %1.cpp
brcc32.exe -w32 %1.rc
ilink32.exe -aa c0w32w %1.obj,%1,,import32 cw32i,,%1.res
%1.exe

I have check with IsWindowUnicode() and all the windows are UNICODE.

What's my problem?

I can read from saved text files in UTF-8 format into a editfield (EM_STREAMIN) with no problem. But if I write something in an editfield and want to get that with a WM_GETTEXT message and set it in another field with WM_SETTEXT it doesn't work. It seems like it doesn't understand that the text is UTF-8, and treats it like ANSI. What am I missing?

Really any help is appreciated.

Thomas