IsValidCodePage function (winnls.h)

Determines if a specified code page is valid.

Syntax

BOOL IsValidCodePage(
  [in] UINT CodePage
);

Parameters

[in] CodePage

Code page identifier for the code page to check.

Return value

Returns a nonzero value if the code page is valid, or 0 if the code page is invalid.

Remarks

A code page is considered valid only if it is installed on the operating system. Unicode is preferred.

Starting with Windows Vista, all code pages that can be installed are loaded by default.

Requirements

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

See also

GetACP

GetCPInfo

GetOEMCP

National Language Support

National Language Support Functions