Unicode 小写字符? [英] Unicode lowercase characters?
问题描述
我在某处读到,在 Unicode 中,除了 A-Z 之外,还有一些字符其他具有小写等效项.这些可能是哪一个,为什么其他字符需要大写和小写?
I read up someplace, that there are characters other than A-Z that have a lowercase equivalent, in Unicode. Which could these be, and why would any other character need an upper and lower case?
推荐答案
英语,甚至是那个奇怪的变体,美国英语 :-) ,并不是这个星球上唯一的语言.有一些非常看起来很奇怪的(至少对于那些熟悉拉丁字符的人来说),但即使是基于拉丁的字符也有细微的变化.
The English language, and even that strange variant, American English :-) , is not the only language on the planet. There are some very strange looking ones (at least to those familiar with the Latin-based characters) but even Latin-based ones have minor variations.
其中两个我不是偶然认识的,是希腊语和德语:
Two of which I am acquainted with on more than a casual basis are Greek and German:
Αα Ββ Γγ Δδ Εε Ζζ Ηη Θθ Ιι Κκ Λλ Μμ
Νν Ξξ Οο Ππ Ρρ Σσς Ττ Υυ Φφ Χχ Ψψ Ωω
Aa Ää Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn
Oo Öö Pp Qq Rr Ss ß Tt Uu Üü Vv Ww Xx Yy Zz
这就是我们不允许使用如下代码的原因:
That's why we're not allowed to use bits of code like:
char lower = upper - 'A' + 'a';
还有.在一家认真对待 i18n 的公司中做这样的事情几乎是被解雇的理由.使用支持 Unicode 的 toLower()/toUpper()
类型的函数是更好的方法.
any more. Doing something like that in a company that takes i18n seriously is near grounds for dismissal. Using Unicode-aware toLower()/toUpper()
-type functions is the better way to go.
这篇关于Unicode 小写字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!