IsDBCSLeadByte function (winnls.h)
Determines if a specified character is a lead byte for the system default Windows ANSI code page (CP_ACP). A lead byte is the first byte of a two-byte character in a double-byte character set (DBCS) for the code page.
Syntax
BOOL IsDBCSLeadByte(
[in] BYTE TestChar
);
Parameters
[in] TestChar
The character to test.
Return value
Returns a nonzero value if the test character is potentially a lead byte. The function returns 0 if the test character is not a lead byte or if it is a single-byte character. To get extended error information, the application can call GetLastError.
Remarks
Lead byte values are specific to each distinct DBCS. Some byte values can appear in a single code page as both the lead and trail byte of a DBCS character.
To make sense of a DBCS string, an application normally starts at the beginning of a string and scans forward, keeping track when it encounters a lead byte, and treating the next byte as the trailing part of the same character. If the application must back up, it should use CharPrev instead of attempting to develop its own algorithm.
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 |