summaryrefslogtreecommitdiff
path: root/enc/unicode
diff options
context:
space:
mode:
authorduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-22 09:34:34 (GMT)
committerduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-22 09:34:34 (GMT)
commit4ca9138bac7fd93501581f65d73435eed59a3087 (patch)
treeb0d6f3d873bf5d351c0ef8b569cef5e87ede2ba3 /enc/unicode
parent5470ce82067948f6d6a18a7805de3c64a2666ddf (diff)
* enc/unicode/case-folding.rb, casefold.h: Adding flag for title-case,
not yet operational. (with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc/unicode')
-rwxr-xr-xenc/unicode/case-folding.rb3
-rw-r--r--enc/unicode/casefold.h24
2 files changed, 14 insertions, 13 deletions
diff --git a/enc/unicode/case-folding.rb b/enc/unicode/case-folding.rb
index 30a1f71..62b534d 100755
--- a/enc/unicode/case-folding.rb
+++ b/enc/unicode/case-folding.rb
@@ -187,7 +187,7 @@ class CaseFolding
end
class MapItem
- attr_reader :upper, :lower
+ attr_reader :upper, :lower, :title
def initialize(code, upper, lower, title)
@code = code
@@ -226,6 +226,7 @@ class CaseMapping
if item
flags += '|U' if to==item.upper
flags += '|D' if to==item.lower
+ flags += '|T' unless item.upper==item.title
end
flags
end
diff --git a/enc/unicode/casefold.h b/enc/unicode/casefold.h
index 318c9ef..1748d32 100644
--- a/enc/unicode/casefold.h
+++ b/enc/unicode/casefold.h
@@ -160,12 +160,12 @@ static const CaseFold_11_Type CaseFold_11_Table[] = {
{0x01b7, {1|F|D, {0x0292}}},
{0x01b8, {1|F|D, {0x01b9}}},
{0x01bc, {1|F|D, {0x01bd}}},
- {0x01c4, {1|F|D, {0x01c6}}},
- {0x01c5, {1|F|D, {0x01c6}}},
- {0x01c7, {1|F|D, {0x01c9}}},
- {0x01c8, {1|F|D, {0x01c9}}},
- {0x01ca, {1|F|D, {0x01cc}}},
- {0x01cb, {1|F|D, {0x01cc}}},
+ {0x01c4, {1|F|D|T, {0x01c6}}},
+ {0x01c5, {1|F|D|T, {0x01c6}}},
+ {0x01c7, {1|F|D|T, {0x01c9}}},
+ {0x01c8, {1|F|D|T, {0x01c9}}},
+ {0x01ca, {1|F|D|T, {0x01cc}}},
+ {0x01cb, {1|F|D|T, {0x01cc}}},
{0x01cd, {1|F|D, {0x01ce}}},
{0x01cf, {1|F|D, {0x01d0}}},
{0x01d1, {1|F|D, {0x01d2}}},
@@ -184,8 +184,8 @@ static const CaseFold_11_Type CaseFold_11_Table[] = {
{0x01ec, {1|F|D, {0x01ed}}},
{0x01ee, {1|F|D, {0x01ef}}},
{0x01f0, {2|F, {0x006a, 0x030c}}},
- {0x01f1, {1|F|D, {0x01f3}}},
- {0x01f2, {1|F|D, {0x01f3}}},
+ {0x01f1, {1|F|D|T, {0x01f3}}},
+ {0x01f2, {1|F|D|T, {0x01f3}}},
{0x01f4, {1|F|D, {0x01f5}}},
{0x01f6, {1|F|D, {0x0195}}},
{0x01f7, {1|F|D, {0x01bf}}},
@@ -3298,9 +3298,9 @@ static const CaseUnfold_11_Type CaseUnfold_11_Table[] = {
{0x01b9, {1|U, {0x01b8}}},
{0x01bd, {1|U, {0x01bc}}},
{0x01bf, {1|U, {0x01f7}}},
- {0x01c6, {2|U, {0x01c4, 0x01c5}}},
- {0x01c9, {2|U, {0x01c7, 0x01c8}}},
- {0x01cc, {2|U, {0x01ca, 0x01cb}}},
+ {0x01c6, {2|U|T, {0x01c4, 0x01c5}}},
+ {0x01c9, {2|U|T, {0x01c7, 0x01c8}}},
+ {0x01cc, {2|U|T, {0x01ca, 0x01cb}}},
{0x01ce, {1|U, {0x01cd}}},
{0x01d0, {1|U, {0x01cf}}},
{0x01d2, {1|U, {0x01d1}}},
@@ -3319,7 +3319,7 @@ static const CaseUnfold_11_Type CaseUnfold_11_Table[] = {
{0x01eb, {1|U, {0x01ea}}},
{0x01ed, {1|U, {0x01ec}}},
{0x01ef, {1|U, {0x01ee}}},
- {0x01f3, {2|U, {0x01f1, 0x01f2}}},
+ {0x01f3, {2|U|T, {0x01f1, 0x01f2}}},
{0x01f5, {1|U, {0x01f4}}},
{0x01f9, {1|U, {0x01f8}}},
{0x01fb, {1|U, {0x01fa}}},