reading and writing xml with Chinese

below is the flow that I'm trying to do.

1. Reading a message from the server("Which is of xml type and has english & Chinese chars")
a. Received xml via the type char.
2. Writing the xml(char type) into the file using the WriteFile API in windows.
Open the same file and reading with the char type, the chinese information is not correct. Its showing some other chinese char.
3. After reading when I try to convert the same using mcstowcs() and storing in wchar_t, its showing as some junk chars.

Reading from file(via watch point) :------- idle_message="缁存澃PC鏃堕挓" key_prompt="鍦ㄦ寜閿?

Msg From Server (via watch point) :------- idle_message="缁存澃PC鏃堕挓" key_prompt="鍦ㄦ寜閿"

After write(in File) :------- idle_message="维杰PC时钟" key_prompt="在按键"

Actual entry in Server :------- idle_message="维杰PC时钟" key_prompt="在按键"

looks strange, when i view in VS2005 watch point, its showing totally different. But when it write to file and view(Editplus), its same as what in server. Same file if I read and view in VS2005 its same as what its received. After using mcstowcs(), the result is totally junk chars.

Thanks
Vijay
Topic archived. No new replies allowed.