Help: ASCII to UNICODE convertion?
-
Hello, Is there an easy way to convert from ASCII code to Unicode? assumes: i have some text written in other encoding like cyrillic, i want to convert it to UNICODE? i am using visual c++ 6.0. could somebody give any advice? thanks
-
Hello, Is there an easy way to convert from ASCII code to Unicode? assumes: i have some text written in other encoding like cyrillic, i want to convert it to UNICODE? i am using visual c++ 6.0. could somebody give any advice? thanks
Gofur Halmurat wrote:
Is there an easy way to convert from ASCII code to Unicode?
You mean like the
A2W()
macro?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Gofur Halmurat wrote:
Is there an easy way to convert from ASCII code to Unicode?
You mean like the
A2W()
macro?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
i dont know what A2W macro is? how can i use it? thanks
-
Hello, Is there an easy way to convert from ASCII code to Unicode? assumes: i have some text written in other encoding like cyrillic, i want to convert it to UNICODE? i am using visual c++ 6.0. could somebody give any advice? thanks
The first 127 code points of the Unicode character set equal the ASCII character set, so you can simply assign each ASCII character to a wide Unicode character.
Gofur Halmurat wrote:
i have some text written in other encoding like cyrillic, i want to convert it to UNICODE?
"cyrillic" isn't an encoding. You must know the actual character set used to encode the cyrilic text, is it ISO-8859-5, Windows CP1251, KOI-8, or something else? Once you know that you can use for example iconv[^] to do the conversion.
-
The first 127 code points of the Unicode character set equal the ASCII character set, so you can simply assign each ASCII character to a wide Unicode character.
Gofur Halmurat wrote:
i have some text written in other encoding like cyrillic, i want to convert it to UNICODE?
"cyrillic" isn't an encoding. You must know the actual character set used to encode the cyrilic text, is it ISO-8859-5, Windows CP1251, KOI-8, or something else? Once you know that you can use for example iconv[^] to do the conversion.
You are right, it is Windows CP1251, i want to change it to UTF-8, but how? i read some about
iconv
, i think that is only under linux os, even if it is under windows, could you give me an example of how to use it? i am really lost of c++ type casting. there are alot of types in c++ thanks -
Hello, Is there an easy way to convert from ASCII code to Unicode? assumes: i have some text written in other encoding like cyrillic, i want to convert it to UNICODE? i am using visual c++ 6.0. could somebody give any advice? thanks
Use MultiByteToWideChar[^] and WideCharToMultiByte[^], respectively.
Hope is the negation of reality - Raistlin Majere
-
i dont know what A2W macro is? how can i use it? thanks
See here.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne