gpt4 book ai didi

Unicode 字母数字字符范围

转载 作者:行者123 更新时间:2023-12-02 15:46:58 24 4
gpt4 key购买 nike

我正在查看IsCharAlphaNumeric Windows API 函数。由于它只需要一个 TCHAR,因此它显然无法对 UTF16 内容的代理对做出任何决定。这是否意味着没有字母数字字符作为代理对?

最佳答案

BMP 之外的字符可以是字母。 (Michael Kaplan 最近 discussed a bug in the classification of the character U+1F48C 。)但是 IsCharAlphaNumeric 无法看到 BMP 之外的字符(出于您提到的原因),因此您无法通过这种方式获取它们的分类信息。

如果您有代理对,请使用 cchSrc = 2 调用 GetStringType 并检查 C1_ALPHAC1_DIGIT.

编辑:此答案的后半部分不正确 GetStringType does not support surrogate pairs .

关于Unicode 字母数字字符范围,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8202259/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com