Ideas to Remember as You Convert from ASCII or ANSI to Unicode

Last reviewed: January 15, 1998
Article ID: Q130052
3.50 1.20 | 1.20 WINDOWS NT | WINDOWS kbother

The information in this article applies to:

  • Microsoft Win32 Software Development Kit (SDK) version 3.5
  • Microsoft Win32s version 1.2

SUMMARY

Because the industry is moving to Windows NT, and Windows NT supports Unicode, many independent software vendors (ISVs) want to know how to convert existing ASCII (or ANSI) help and resource files into Unicode. This article gives you some notes on the subject.

MORE INFORMATION

When converting ASCII to Unicode, remember that the entire ASCII characters map perfectly to the first characters in Unicode. You need only add a second null bit and a 0x00 in the high byte.

When converting ANSI to Unicode, UCONVERT.EXE sources in the Win32 SDK and the good illustration of win32 MultiBytetoWideChar conversion API are helpful sources to consult.

When converting a Help file, you face the challenge presented by the fact that the old ANSI RTF format is clueless about wide characters. Also, you need an RTF format for each specific country. For example, you'll need one specific to Japan, another separate RTF format for Korea, and so on. In addition, you might want to consider converting to the newer, much more powerful Help file formats supported in the Windows 95 Help file system; this may be an easier solution.

Help files in Windows NT versions 3.1 and 3.5 use the same Help file format as Windows version 3.1 does. But newer operating systems such as Windows 95 contains a new help file compiler, engine, and format. One reason that Microsoft made this change was to improve international support.

One final idea you might want to consider is to develop your own converter by using the MutltiByteToWideChar() API. In fact, this may be the best approach, because application developers know exactly what kind of user interface they want to implement.


Additional reference words: 1.20 3.50 kbinf
KBCategory: kbother
KBSubcategory: KBIntlDev


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 15, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.