IsNormalizedString

Verifies that a string is normalized according to Unicode 4.0 TR#15. For more information, see Using Unicode Normalization to Represent Strings.

Syntax

WINNORMALIZEAPI BOOL IsNormalizedString(
         NORM_FORM NormForm,
         _In_reads_(cwLength)LPCWSTR lpString,
         int cwLength
)  

Parameters

NormForm
Type: NORM_FORM 

Normalization form to use. NORM_FORM specifies the standard Unicode normalization forms.

lpString
Type: In_reads(cwLength)LPCWSTR 

Pointer to the string to test.

cwLength
Type: int 

Length, in characters, of the input string, including a null terminating character. If this value is -1, the function assumes the string to be null-terminated and calculates the length automatically.

Return value

Type: WINNORMALIZEAPI BOOL 

Returns TRUE if the input string is already normalized to the appropriate form, or FALSE otherwise. To get extended error information, the application can call GetLastError, which can return one of the following error codes:

If you need to reliably determine FALSE from an error condition, then it must call SetLastError(ERROR_SUCCESS).

Remarks

Windows XP, Windows Server 2003: The required header file and DLL are part of the “Microsoft Internationalized Domain Name (IDN) Mitigation APIs” download, available at the MSDN Download Center.

Requirements

Header: Declared in winnls.h.

Library: Use kernelx.lib.