From 3026471cfce5bdd4b51c95c782265cd87f4d2bc3 Mon Sep 17 00:00:00 2001 From: duerst Date: Tue, 23 Feb 2016 12:53:10 +0000 Subject: * enc/unicode/case-folding.rb, casefold.h: Outputting actual titlecase data (new table, with indices from other tables). * enc/unicode.c: Ignoring titlecase data indices for the moment. (with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- enc/unicode/case-folding.rb | 23 +++- enc/unicode/casefold.h | 269 +++++++++++++++++++++++++++++--------------- 2 files changed, 198 insertions(+), 94 deletions(-) (limited to 'enc/unicode') diff --git a/enc/unicode/case-folding.rb b/enc/unicode/case-folding.rb index 425c37a9f9..174808afaa 100755 --- a/enc/unicode/case-folding.rb +++ b/enc/unicode/case-folding.rb @@ -175,6 +175,9 @@ class CaseFolding name = "CaseUnfold_13" data = print_table(dest, name, mapping_data, name=>unfold[2]) dest.print lookup_hash(name, "CodePointList2", data) + + # TitleCase + dest.print mapping_data.titlecase_output end def debug! @@ -195,15 +198,12 @@ class MapItem @lower = lower unless lower == '' @title = title unless title == '' end - - def flags - "" # preliminary implementation - end end class CaseMapping def initialize (mapping_directory) @mappings = {} + @titlecase = [] IO.readlines(File.expand_path('UnicodeData.txt', mapping_directory), encoding: Encoding::ASCII_8BIT).each do |line| next if line =~ /^