快速业务通道

LCMapString函数

作者 佚名技术 来源 程序设计 浏览 发布时间 2012-06-29

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.

If the LCMAP_SORTKEY flag is not specified, the LCMapString function performs string mapping. In this case the following restrictions apply:

- LCMAP_LOWERCASE and LCMAP_UPPERCASE are mutually exclusive.

- LCMAP_HIRAGANA and LCMAP_KATAKANA are mutually exclusive.

- LCMAP_HALFWIDTH and LCMAP_FULLWIDTH are mutually exclusive.

- LCMAP_TRADITIONAL_CHINESE and LCMAP_SIMPLIFIED_CHINESE are mutually exclusive.

- LCMAP_LOWERCASE and LCMAP_UPPERCASE are not valid in combination with any of these flags: LCMAP_HIRAGANA, - LCMAP_KATAKANA, LCMAP_HALFWIDTH, LCMAP_FULLWIDTH.

When the LCMAP_SORTKEY flag is specified, the LCMapString function generates a sort key. In this case the following restriction applies:

- LCMAP_SORTKEY is mutually exclusive with all other LCMAP_* flags, with the sole exception of LCMAP_BYTEREV.

lpSrcStr

[in] Pointer to a sou

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号