I think it was already a long time ago that you implemented Unicode support for Gamestudio, but only recently I looked at how this Unicode support actually works.

The manual says, I'm supposed to write my strings in a text file and read them with txt_loadw. WTF? I can't write Unicode strings at runtime and without having all my strings preset in a text file, and open to everyone?

So, I would like to have a function str_createw(short* s).
It would use short, because wchar_t doesn't exist in Lite-C, but short is basically the same anyway.

This way, I could create a Unicode string like this:

Code:
short shortarray[6];
shortarray[0] = 0x3053;
shortarray[1] = 0x3093;
shortarray[2] = 0x306B;
shortarray[3] = 0x3061;
shortarray[4] = 0x306F;
shortarray[5] = 0x0000;

STRING* mystring = str_createw(stringarray); // mystring now contains "konnichiwa" in Japanese Hiragana


The string would then be "こんにちは".

That wouldn't be hard to implement, would it? wink


EDIT: Oh, and of course, there should also be a function _short(STRING* s) that returns a short array for a string, just like _chr(STRING*) returns a char array for "normal" strings.

Last edited by Lukas; 03/27/12 13:22.