Re: Conversion of DBCS / MBCS characters to UTF8

From: Paul Keinanen (
Date: Fri Jan 14 2000 - 14:03:08 EST

On Fri, 14 Jan 2000 09:56:45 -0800 (PST), "Magda Danish (Unicode)"
<> wrote:

>Magda Danish - Administrative Director
>Unicode, Inc. - (650)693-3921
>-----Original Message-----
>From: Kedar Moghe []
>Sent: Thursday, January 13, 2000 7:13 PM
>To: ''
>Subject: I need some support.
> I work with Quark Media House (URL: Here, I am
>developing a software product for Japanese market, which requires conversion
>of DBCS / MBCS characters to UTF8 and vice versa. Basically, it is
>Windows/NT environment.

I am not sure if I understood the problem correctly, but you could
convert the Japanese DBCS/MBCS codepage to 16 bit Unicode characters
using the MultiByteToWideChar Win32 API and then convert those Unicode
characters to UTF-8 using WideCharToMultiByte and specifying the code
page as CP_UTF8. To convert in the opposite direction the same
routines can be called with different parameters.

Note that the CP_UTF8 "code page" for converting from/to Unicode is
only supported on Windows NT 4.0 and Windows 2000, so if support for
Windows NT 3.51 is required, these simple conversions may have to be

Paul Keinšnen

This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:20:58 EDT