RE: mbstowcs and UNICODE

From: Gerard Cattin (Gerard_Cattin@ccm.ut.intel.com)
Date: Thu Dec 04 1997 - 13:22:00 EST


Text item: Text Item

Don't use those apis. They are not well enabled. If you have completely Japanese
characters, for instance, then they work. However, if you have some English
characters, particularly in the front of the word, then, the api has a short cut
process that merely adds null characters, and if you have non-English, Asian
characters following, they will get the NULL treatment just the same. This
affected millions of lines of code. Use the platform specific api such as
WideCharToMultiByte(Ex) or MultiByteToWideChar(Ex).

As for NLM development, mbstowcs returns a 32 bit value instead of a 16 bit
unsigned short. This can be overcome by changing size_t to an unsigned short
however.

-----Original Message-----
From: unicode@unicode.org
Sent: Thursday, December 04, 1997 9:38 AM
To: unicode@unicode.org
Subject: mbstowcs and UNICODE

Hello,
I'm working on a project that needs to convert different character sets
to Unicode and vice versa, on several platforms.
In the NT platform this can actually be done by calling the ANSI C
functions mbstowcs and wcstombs.
Do you have any idea if these functions do conversion to and from UNICODE
on SUN,HP,VMS,MVS,AS400?
Are there other native functions to do these conversions ?

Thanx,

Beni Hoffman bhoff@level8.co.il
Level8 Systems 03-5582608 << File: TXT1.TXT
>>



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