summaryrefslogtreecommitdiff
path: root/enc/unicode/case-folding.rb
diff options
context:
space:
mode:
Diffstat (limited to 'enc/unicode/case-folding.rb')
-rwxr-xr-xenc/unicode/case-folding.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/enc/unicode/case-folding.rb b/enc/unicode/case-folding.rb
index dfb5f47..cd14b6e 100755
--- a/enc/unicode/case-folding.rb
+++ b/enc/unicode/case-folding.rb
@@ -238,8 +238,11 @@ class CaseMapping
flags += '|U' if to==item.upper
flags += '|D' if to==item.lower
unless item.upper == item.title
- flags += "|T(#{@titlecase.length})"
- @titlecase << item
+ unless title_index = @titlecase.find_index { |i| i.title==item.title }
+ title_index = @titlecase.length
+ @titlecase << item
+ end
+ flags += "|T(#{title_index})"
end
end
flags