How to get a chinese charackter in an string ?
Is it that possible at all ?

Greets !
Posted on 2003-04-14 05:24:18 by Forginforcer
In which context? You need to be more specific!
There's issues such as which APIs to use (*A vs. *W), which also means MBCS vs. UNICODE.
Posted on 2003-04-14 06:22:29 by f0dder
Use unicode.
Posted on 2003-04-14 06:25:43 by roticv
unicode ???
chinese charackter get saved as questionmarks.
In resource files its should be clear, but in the source files.
where i can read what i have to do ?
Posted on 2003-04-14 06:47:34 by Forginforcer
You need to be more clear wtf you mean...
Posted on 2003-04-14 06:50:56 by f0dder
Ah, you ask a vague question, therefore you get an vague answer.
By the way, do you understand the meaning of unicode? To work with chinese characters you definitely need to use unicode. Let's say ?? (me in chinese) is represented as 0CED2h. When working with unicode you are using words and not bytes. The reason why it works in resources is that resources are saved in unicode (in case you did not know).
Posted on 2003-04-14 07:01:07 by roticv
you sure mean the word "wo4" bit it istn shown, in you post. but I can see chinese charachters.
Wehen i want tu use chinese charachters, i have to do every thing with DWORD-variabels ? But, what is, wehen my editor dont support that ? Will ml.exe suport that ?
Posted on 2003-04-14 08:39:45 by Forginforcer
If you want to show strings in chinese, you have to manual to translate it to hex. btw, unicode uses *words* 16bit, not DWORD or BYTE.

me dw 0CED2h,0
Posted on 2003-04-14 08:47:53 by roticv
I doubt masm supports unicode text. You're better off using english comments in your source files :tongue: .
I believe that "weird" languages should still have an ISO-whatever character set to represent them in singlebyte (the case of russian, afaik), and if that doesn't give enough chars, some multibytes (MBCS) representation (which should probably work with most existing tools). Whether your editor supports MBCS is another question, and my guess is that most don't - most of us western people see one char as one byte, or one 16bit word in the case of unicode. MBCS is not as pleasant to deal with.
Posted on 2003-04-14 08:53:18 by f0dder
ah thx !
so It would be usefule to have a programm, that convert chinese charachters to hex ! I should unicode, shouldn't I ? And for russina language to ?

Greets !
Posted on 2003-04-14 09:13:37 by Forginforcer
just save it as unicode instead of ANSI
and use words instead of bytes :/
Posted on 2003-04-14 09:30:04 by Hiroshimator
I have the programm ConTEXT, it only saves ansi, I think.
Wich programm I sould use ?
Posted on 2003-04-14 09:42:11 by Forginforcer
I was using character map.. lol.... the only tool i have to read chinese (and it display the hex value). btw, which country are you from?
Posted on 2003-04-14 09:49:11 by roticv
I don't know which editors out there support unicode - and even more interestingly, which compilers/assemblers support it as input.

For text files, just about any word processor should (ought to) work, but for programming... well, you really ought to have english comments anyway ^_^
Posted on 2003-04-14 09:51:55 by f0dder
Im a orginal german p***y-licker, and speak a little bit russian, english and chinese. Chinese is my 2-nd foring language !
Posted on 2003-04-14 10:19:02 by Forginforcer
I see.... I am a chinese basically, just that i speak more english than chinese. :grin:
Posted on 2003-04-14 11:07:35 by roticv

As opposed expecting us to explain everything about the subject of how characters are represented in Unicode, why don't you google for some documentation on it, there are thousands of sources for this. All characters are stored as numbers, it is the job of the individual software to visually represent these numbers as characters on the screen. When it comes to non western characters the standard 256 byte (8 bit) character table is not enough to represent all of the possibilities as well as keeping the base characters so they extended the character set by adding an extra byte. If your software does not decode this extra byte you will get garbage on the screen instead of the characters you are looking for. Since MASM only deals with numbers, characters in any set are perfectly available to it, you just use words instead of bytes when you allocate your buffers and you can use Unicode.

PS: When using Unicode be sure to append the API calls with a W where necessary i.e.

invoke SendMessageW, hWnd, Msg, wParam, lParam
Posted on 2003-04-14 12:00:32 by donkey
Ah thanks !

Hey, I thought, the board is for question ?
Acually you can google for everything.
Posted on 2003-04-14 12:17:01 by Forginforcer
Red, the questioned was asked and answered. You asked about displaying chinese characters and everybody told you to use Unicode. You asked about Unicode and everybody explained what it was. There is also an assumption here that you will do a little bit of the research yourself, that is how you learn, having everything spoonfed to you does not help you.
Posted on 2003-04-14 12:26:33 by donkey