Dave's Brain

Browse - Programming Tips - How do I convert Big5 (Traditional Chinese) text to Unicode?

Date: 2003Oct2
Platform: win32
Language: C/C++

Q. How do I convert Big5 (Traditional Chinese) text to Unicode?

A. Do this:

MultiByteToWideChar(950, ...);
950 is the Windows code page number for Big5. For example:
#ifndef CP_BIG5 #define CP_BIG5 (950) #endif wchar_t szTextW[1024]; MultiByteToWideChar(CP_BIG5, 0, szBig5, -1, szTextW, sizeof(szTextW));

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.