结合Grapheme Joiner在iOS的Cocoa中不起作用?

结合Grapheme Joiner在iOS的Cocoa中不起作用?,第1张

概述这个字符串: [NSString stringWithFormat:@"%C%C%C%C", 0x31, 0x34f, 0x32, 0x20dd] 应该在两个角色周围显示为12圈. 0x34f是Combining Grapheme Joiner,0x20dd是组合圆. 显示的是12,圆圈只有2.木匠似乎被忽略了.有没有办法让组合字形连接器工作? 不建议使用Combining Grapheme Jo 这个字符串:

[Nsstring stringWithFormat:@"%C%C%C%C",0x31,0x34f,0x32,0x20dd]

应该在两个角色周围显示为12圈. 0x34f是Combining Grapheme Joiner,0x20dd是组合圆.

显示的是12,圆圈只有2.木匠似乎被忽略了.有没有办法让组合字形连接器工作?

解决方法 不建议使用Combining Grapheme Joiner:

从Unicode标准,第16.2章布局控件 – 组合字形连接器

Rendering. For rendering,the combining grapheme joiner is invisible.
However,some older implementations may treat a sequence of grapheme
clusters linked by combining grapheme joiners as a single unit for the
application of enclosing combining marks. For more information on
grapheme clusters,see Unicode Technical Report #29,“Unicode Text
Segmentation.” For more information on enclosing combining marks,see
Section 3.11,normalization Forms.

从第3.6章组合

It should be noted,however,that older implementations may have
supported the application of an enclosing combining mark to an entire
Indic consonant conjunct or to a sequence of grapheme clusters linked
together by combining grapheme joiners. Such an approach has a number
of technical problems and leads to interoperability defects,so it is
strongly recommended that implementations do not follow it.

从http://unicode.org/faq/char_combmark.html#19起

Q: Is it possible to apply a diacritic or combining enclosing mark to a sequence of more than one (non-combining) character?

  
  答:不,除了故意设计用于双字母序列的“双变音符号”之外,例如: U 035D组合双倍的BREVE. ZWJ(U 200D ZERO WITDH JOINER)和CGJ(U 034F COMBINING GRAPHEME JOINER)都不会将任何后续组合字符的范围受影响的方式“混合”字符.要将像“Esc”这样的字符序列放入类似于U 20E3 COMBINING ENCLOSING KEYCAP的字符序列中,您必须使用更高级别的协议. [KP]

总结

以上是内存溢出为你收集整理的结合Grapheme Joiner在iOS的Cocoa中不起作用?全部内容,希望文章能够帮你解决结合Grapheme Joiner在iOS的Cocoa中不起作用?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1001209.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-21
下一篇 2022-05-21

发表评论

登录后才能评论

评论列表(0条)

保存