From: Jean-Baptiste GAGELIN (
Date: Fri Jul 05 1996 - 05:47:00 EDT

Hi all,
Here is a post dealing with

A) Where to search Unicode development information.
B) How to build software on multiplatform (Unicode, not Unicode, same,
different binaries) on PC.

If any one have the same kind of information in UNIX environment, I'll be glad
to hear about it. Thanks. email if for all,


- tips on I18N.
- and
- Dejanews server (, mix searches with: UNICODE, UNIX,
- (Good site!)
In, retrieve
two samples.
Warning: They are not exhaustive, can't be compiled but can help with the
WideChartomultibyte/multibytetowideChar samples.
- FTP site, Start with the /pub/ directory
- This package handling UTF-7, UTF-8, GB 2312 and Big-5 conversion.
- conversion tables extracted from cjkxref.txt,
found on the site.
- for conversion tools on all platforms.

- Microsoft Win32 SDK Help: Win32/Overview/International Features. (45 pages)
- Nadine Kano's Book "Developping International Software for W95 and NT",
Microsoft Press.
- Newsgroup: will provide discussions and :
Archive-name: internationalization/font-faq
Archive-name: internationalization/programming-faq (
- Newsgroup
- Newsgroup comp.std.internat
- subscribe to listserv and send subscribe

B) Main constraints on the development:

(Here it is assumed that :
ANSI, includes ANSI, DBCS/MBCS: all that deals with Code Pages.
Unicode and wide char are used interchangeably. )

Broad infos:

With the Win32 API, it is provided per functionality ( let us call it 'Fctn')
using strings 3 functions:
        FctnA: The Ansi version. String arguments must be Ansi (char type)
        FctnW: The Unicode version (all is availlable for NT 3.5)
        Fctn: This is the generic function. This is a macro that will be
replaced at comilation time.

Windows provides four levels of compatibility with the NLSAPI.
1) Win32s release 1.2.
2) Windows NT 3.1.
3) Windows NT 3.5.
4) Windows 95.
Let us call them 1,2,3,4.


Build code that will either work with Unicode or ANSI depending on
(faster code)
For each Fctn, use it's generic.
Compile with or without UNICODE.
On Win 95 there will be ANSI, on NT UNICODE.
=> 2 executables are generated. (optimised, but one can't work on the other)

Build Unicoded data on MS_multiplatform:
We try to build code that will work on every Windows platform, with the same
This describes how to process string-system functions.
This is a chapter because Microsoft provides a lot of functions dealing with
UNICODE, Wfunctions.
Do not define UNICODE at compile time.

For each Fctn, create a wrapper FctnWrap
FctnWrap =
Find the real function available for the system:
If FctnW is provided, use it (NT only).
        if FcntnA is provided (we have win95 or win3.1(plus win32s))
        perform conversion with WideChartomultibyte Win32 API or mbtowc/
wctomb functions
        Use the A version of Fctn, FctnA.
perform conversion with MultibytetowideChar if needed.
else manage as you can...but you should avoid to use this function. This is a
function system dependent.

Example: For CompareString,
The support of CompareString is the following:
CompareStringW is OK for level 2,3
CompareStringA is OK for level 1,3,4
(This can be found in Nadine Kano's Book, p 523, but most of the time A-
function is OK for 1,3,4, W-function is OK for sometimes 2, and 3. All is OK
for 3, always.)

So if the soft runs on level 2 or 3, use CompareStringW.
if the soft runs on level 1,4 take your UNICODE data, convert it with
WideChartomultibyte, run CompareStringA.
Build Unicoded data on UNIX_multiplatform:
We try to build code that will work on every Windows platform, with the same

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