LCMapString函数
The LCMapString function either maps an input character string to another using a specified transformation or generates a sort key for the input string.
定义
int LCMapString(LCID Locale, DWORD dwMapFlags, LPCTSTR lpSrcStr, int cchSrc, LPTSTR lpDestStr, int cchDest);
参数
Locale
[in] Specifies a locale identifier. The locale provides a context for the string mapping or sort key generation. An application can use the MAKELCID macro to create a locale identifier.
dwMapFlags
[in] Specifies the type of transformation used during string mapping or the type of sort key generated. An application can specify one or more of the following options. Restrictions are noted following the table.
LCMAP_BYTEREV - Windows NT/2000/XP: Use byte reversal. For example, if you pass in 0x3450 0x4822 the result is 0x5034 0x2248.
LCMAP_FULLWIDTH - Uses wide characters (where applicable).
LCMAP_HALFWIDTH - Uses narrow characters (where applicable).
LCMAP_HIRAGANA - Hiragana.
LCMAP_KATAKANA - Katakana.
LCMAP_LINGUISTIC_CASING - Uses linguistic rules for casing, rather than file system rules (the default). Valid with LCMAP_LOWERCASE or LCMAP_UPPERCASE only.
LCMAP_LOWERCASE - Uses lowercase.
LCMAP_SIMPLIFIED_CHINESE - Windows NT 4.0 and later: Maps traditional Chinese characters to simplified Chinese characters.
LCMAP_SORTKEY - Produces a normalized wide charactersort key. For more information, see lpDestStr and Remarks.
LCMAP_TRADITIONAL_CHINESE - Windows NT 4.0 and later: Maps simplified Chinese characters to traditional Chinese characters.
LCMAP_UPPERCASE - Uses uppercase.
The following flags are used only with the LCMAP_SORTKEY flag. Flag Meaning
NORM_IGNORECASE - Ignores case.
NORM_IGNOREKANATYPE - Does not differentiate between Hiragana and Katakana characters. Corresponding Hiragana and Katakana will compare as equal.
NORM_IGNORENONSPACE - Ignores nonspacing. This flag also removes Japanese accent characters.
NORM_IGNORESYMBOLS - Ignores symbols.
NORM_IGNOREWIDTH - Does not differentiate between a single-byte character and the same character as a double-byte character.
SORT_STRINGSORT - Treats punctuation the same as symbols.