Microsoft KB Archive/210341

{|
 * width="100%"|

INFO: Unicode Support in Windows 95 and Windows 98

 * }

Q210341

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API)

-

SUMMARY
Although Windows 95 is an eight-bit ANSI, or for Far East Windows, a Multibyte (MBCS) character set operating system, it implements a few Unicode functions. Windows 98 has added support for a few more functions and there are techniques to implement additional Unicode support.

MORE INFORMATION
Windows 95 is natively an eight-bit character code operating system. That is, it fundamentally processes all character strings one byte at a time. Far East versions of Windows 95 are called Multibyte Character Set (MBCS) systems because they use a signal or lead byte combined with a second trailing byte to expand the character code range beyond the 256 limitation of a one-byte representation.

The Unicode standard offers application developers an opportunity to work with text without the limitations of character set based systems. For more information on the Unicode standard see the "References" section of this article. Windows NT is a fully Unicode capable operating system so it may be desirable to write software that supports Unicode on Windows 95.

Even though Windows 95 and Windows 98 are not Unicode based, they do provide some limited Unicode functionality. Drawing of Unicode text is possible because the TrueType fonts that are used by Windows are encoded using Unicode. Therefore, a small subset of Win32 functions have wide character (Unicode) equivalents that are implemented in Windows 95. To review the list of these functions that was first published for Windows 95 see the white paper listed in the "References" section of this article.

The Quick Info information in the Platform SDK describes the following wide character functions as implemented on Windows 95:


 * EnumResourceLanguagesW
 * EnumResourceNamesW
 * EnumResourceTypesW
 * ExtTextOutW
 * FindResourceW
 * FindResourceExW
 * GetCharWidthW
 * GetCommandLineW
 * GetTextExtentPoint32W
 * GetTextExtentPointW
 * lstrlenW
 * MessageBoxExW
 * MessageBoxW
 * MultiByteToWideChar
 * TextOutW
 * WideCharToMultiByte

For Windows 98, there have been two more functions implemented:


 * lstrcpyW
 * lstrcatW

Also available to applications on Windows 95 and later is the CF_UNICODETEXT clipboard format for exchanging/converting Unicode text across the clipboard. See Nadine Kano's book listed in the "References" section of this article.

With this API subset, an application can read, write, display, and convert Unicode data. However, in some cases an application developer working with Unicode may find a need to work directly with the glyphs in the TrueType font file.

Such a case arises if a software developer would like to use the services of the GetGlyphOutline function. Unfortunately, there is no wide character implementation of this function on Windows 95. However, this function does work with TrueType glyph indices so the solution is convert the Unicode character code to a glyph index.

A developer might also want to take advantage of the TrueType Open tables of a font to perform ligature or contextual glyph substitution. To do this, the application would need to work with glyph indices. See the "References" section of this article for more information on converting Unicode to glyph indices.