зеркало из https://github.com/github/ruby.git
3628eae2e7
The modern Georgian script is special in that it has an 'uppercase' variant called MTAVRULI which can be used for emphasis of whole words, for screamy headlines, and so on. However, in contrast to all other bicameral scripts, there is no usage of capitalizing the first letter in a word or a sentence. Words with mixed capitalization are not used at all. We therefore implement special behavior for String#capitalize. Formally, we define String#capitalize as first applying String#downcase for the whole string, then using titlecase on the first letter. Because Georgian defines titlecase as the identity function both for MTAVRULI ('uppercase') and Mkhedruli (lowercase), this results in String#capitalize being equivalent to String#downcase for Georgian. This avoids undesirable mixed case. * enc/unicode.c: Actual implementation * string.c: Add mention of this special case for documentation * test/ruby/enc/test_case_mapping.rb: Add two tests, a general one that uses String#capitalize on some (including nonsensical) combinations of MTAVRULI and Mkhedruli, and a canary test to detect the potential assignment of characters to the currently open slots (holes) at U+1CBB and U+1CBC. * test/ruby/enc/test_case_comprehensive.rb: Tweak generation of expectation data. Together with r65933, this closes issue #14839. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
||
---|---|---|
.. | ||
jis | ||
trans | ||
unicode | ||
Makefile.in | ||
ascii.c | ||
big5.c | ||
cp949.c | ||
depend | ||
ebcdic.h | ||
emacs_mule.c | ||
encdb.c | ||
encinit.c.erb | ||
euc_jp.c | ||
euc_kr.c | ||
euc_tw.c | ||
gb2312.c | ||
gb18030.c | ||
gbk.c | ||
iso_2022_jp.h | ||
iso_8859.h | ||
iso_8859_1.c | ||
iso_8859_2.c | ||
iso_8859_3.c | ||
iso_8859_4.c | ||
iso_8859_5.c | ||
iso_8859_6.c | ||
iso_8859_7.c | ||
iso_8859_8.c | ||
iso_8859_9.c | ||
iso_8859_10.c | ||
iso_8859_11.c | ||
iso_8859_13.c | ||
iso_8859_14.c | ||
iso_8859_15.c | ||
iso_8859_16.c | ||
koi8_r.c | ||
koi8_u.c | ||
make_encmake.rb | ||
mktable.c | ||
shift_jis.c | ||
shift_jis.h | ||
unicode.c | ||
us_ascii.c | ||
utf_7.h | ||
utf_8.c | ||
utf_16_32.h | ||
utf_16be.c | ||
utf_16le.c | ||
utf_32be.c | ||
utf_32le.c | ||
windows_31j.c | ||
windows_1250.c | ||
windows_1251.c | ||
windows_1252.c | ||
windows_1253.c | ||
windows_1254.c | ||
windows_1257.c | ||
x_emoji.h |