IsNormalizedString function (winnls.h)
Verifies that a string is normalized according to Unicode 4.0 TR#15. For more information, see Using Unicode Normalization to Represent Strings.
Syntax
BOOL IsNormalizedString(
[in] NORM_FORM NormForm,
[in] LPCWSTR lpString,
[in] int cwLength
);
Parameters
[in] NormForm
Normalization form to use. NORM_FORM specifies the standard Unicode normalization forms.
[in] lpString
Pointer to the string to test.
[in] cwLength
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
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:
- ERROR_INVALID_PARAMETER. Any of the parameter values was invalid.
- ERROR_NO_UNICODE_TRANSLATION. Invalid Unicode was found in string.
- ERROR_SUCCESS. The action completed successfully but yielded no results.
Remarks
Windows XP, Windows Server 2003:
No longer supported.
The required header file and DLL are part of the Microsoft Internationalized Domain Name (IDN) Mitigation APIs, which are no longer available for download.
Examples
An example showing the use of this function can be found in NLS: Unicode Normalization Sample.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | winnls.h (include Windows.h) |
DLL | Normaliz.dll |
Redistributable | Microsoft Internationalized Domain Name (IDN) Mitigation APIs onWindows XP with SP2 and later, orWindows Server 2003 with SP1 |