HOWTO: Add nls Macintosh Tables to Windows 95 and Windows 98
ID: Q230147
|
The information in this article applies to:
SUMMARY
Here is an outline of a workaround for the problem of converting between Unicode and Macintosh codepages in Windows 95 and Windows 98, and installing the proper nls table for the Macintosh. Notice that this procedure is necessary for Windows 95 and Windows 98 only, because the nls table comes installed by default with Windows NT.
MORE INFORMATION
Windows 95 and Windows 98 don't ship with Macintosh nls tables or even predefined registry entries for it. The following procedure be adapted to include any nls table.
Because Windows 95 and Windows 98 don't ship with the Macintosh tables, the user must install them by hand if they are needed.
Install the nls table as follows:
- Obtain the Macintosh code page from Microsoft Product Support Services.
- Save the nls file (in this case, Cp_10000.nls) into your system directory.
- Run regedit and navigate to the following reg key:
\my\computer\HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Nls\Codepage
- Create a new string value and call it 10000.
- Add the string "Cp_10000.nls" as its value.
- Close regedit and reboot the machine (rebooting may not be necessary).
It is not possible to use the constant CP_MACCP, because it is not defined for Windows 95 and Windows 98; instead, use the actual Macintosh codepage value, which is 10000. For example:
WCHAR wsz[MAX_PATH];
char sz[MAX_PATH];
int cwChar = 0;
// Convert to Unicode.
strcpy(sz, "This is a Test");
cwChar = MultiByteToWideChar(CP_MACCP, 0, szT, -1,
wsz, MAX_PATH); // This fails on Win9x
cwChar = MultiByteToWideChar(10000, 0, sz, -1, wsz, MAX_PATH); // This returns a count of 15.
Additional query words:
Keywords :
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbhowto