PRB: setlocale(LC_ALL, ".OCP") Returns NULL for Some Locales on US Windows NT 4.0

ID: Q230138


The information in this article applies to:
  • Microsoft Windows NT 4.0

IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.

SYMPTOMS

On Windows NT 4.0, if the locale is similar to one of the following, setlocale(LC_ALL,".OCP") may return NULL:

  • Russian_Russia
  • Serbian (Latin)_Serbia
  • Slovak_Slovakia
  • Turkish_Turkey
  • Ukrainian_Ukraine


CAUSE

This is by design. Windows NT 4.0 no longer copies various OEM code pages to the system at installation time. For US Windows NT, only OEM code pages 437 and 850 are installed at setup time. The locales listed in the "Summary" section all require OEM code pages other than 437 and 850, and therefore setlocale(LC_ALL, ".OCP") returns NULL.


RESOLUTION

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).

To install the additional OEM code pages, copy them from the Windows NT setup CD to the Windows NT System32 directory, then update the registry:

HKEY_LOCAL_MACHINE\SYSTEM\currentcontrolset\control\NLS\codepage
The locale listed in the "Summary" section require different code pages:
  • Russian_Russia.866
  • Serbian (Latin)_Serbia.852
  • Slovak_Slovakia.852
  • Ukrainian_Ukraine.866

Additional query words:

Keywords : kbCRT kbNLS kbLocalization kbGrpIntl kbDSupport
Version : winnt:4.0
Platform : winnt
Issue type : kbprb


Last Reviewed: December 15, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.