ICU Unicode普通与全角 [英] ICU Unicode Normal vs Fullwidth

查看:88
本文介绍了ICU Unicode普通与全角的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对unicode和unicode字符串有些陌生.我正在尝试确定全角"符号和普通符号之间的区别.

I am somewhat new to unicode and unicode strings. I'm trying to determine the difference between "fullwidth" symbol and a normal one.

以这两个为例:

正常: http://www.fileformat.info/info /unicode/char/20a9/index.htm

全角: http://www.fileformat.info/info /unicode/char/ffe6/index.htm

我注意到全角被定义为U + 20A9,巧合的是20A9是正常宽度.那么U的值是什么?

I notice that the fullwidth is defined as U+20A9 and coincidentally 20A9 is the normal one. So what is the value of U?

使用类似ICU的库时,有没有一种方法可以指定总是返回正常还是满?

When using libraries like ICU is there a way to specify always return normal versus full?

谢谢

推荐答案

U + number是Unicode代码点的符号约定.没有U的值".

U+number is a notational convention for a Unicode code point. There is no 'value' of U.

U + 0020是一个空格.内存中的值为十进制的32,十六进制的20.

U+0020, for example, is a space. The value in memory is 32 decimal, 20 hex.

全角字符完全是另外一回事.

Full width characters are a whole other story.

在3270年代,汉兹在显示屏中占据了内存中的两个位置.因此,他们还占用了屏幕上的两列.为了使排列整齐,IBM定义了一组全角"(最好是全角")字母和数字.

Back in the days of the 3270, Hanzi took up two positions in memory in the display. So they also took up two columns on the screen. To make things line up neatly, IBM defined a set of 'full-width' (better would have been 'double-width') letters and numbers.

如果某些ICU API提供了全角,则可以使用Normalizer摆脱它.您也可以将票发布到他们的票务系统,这似乎很奇怪.

If some ICU API is delivering full-width, you can use the Normalizer to get rid of it. You might also post a ticket to their ticket system, this seems odd.

这篇关于ICU Unicode普通与全角的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆