GetOEMCP function (winnls.h)

Returns the current original equipment manufacturer (OEM) code page identifier for the operating system.

Note   The ANSI code pages can be different on different computers, or can be changed for a single computer, leading to data corruption. For the most consistent results, applications should use Unicode, such as UTF-8 or UTF-16, instead of a specific code page.



Return value

Returns the current OEM code page identifier for the operating system.


See Code Page Identifiers for a list of OEM and other code pages.


Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header winnls.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

See also


National Language Support

National Language Support Functions