ruby-changes:41796
From: duerst <ko1@a...>
Date: Fri, 19 Feb 2016 12:45:05 +0900 (JST)
Subject: [ruby-changes:41796] duerst:r53870 (trunk): * enc/unicode.c: Activated use of case mapping data in CaseUnfold_11 array.
duerst 2016-02-19 12:45:32 +0900 (Fri, 19 Feb 2016) New Revision: 53870 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53870 Log: * enc/unicode.c: Activated use of case mapping data in CaseUnfold_11 array. (with Kimihito Matsui) Modified files: trunk/ChangeLog trunk/enc/unicode.c Index: ChangeLog =================================================================== --- ChangeLog (revision 53869) +++ ChangeLog (revision 53870) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Feb 19 12:44:57 2016 Martin Duerst <duerst@i...> + + * enc/unicode.c: Activated use of case mapping data in CaseUnfold_11 array. + (with Kimihito Matsui) + Fri Feb 19 11:08:32 2016 Nobuyoshi Nakada <nobu@r...> * ext/extmk.rb: add cygwin case, nothing excluded. Index: enc/unicode.c =================================================================== --- enc/unicode.c (revision 53869) +++ enc/unicode.c (revision 53870) @@ -698,6 +698,15 @@ onigenc_unicode_case_map(OnigCaseFoldTyp https://github.com/ruby/ruby/blob/trunk/enc/unicode.c#L698 } } } + else if ((folded = onigenc_unicode_unfold1_lookup(code)) != 0) { + if (flags&OnigCaseFoldFlags(folded->n)) { + int count = OnigCodePointCount(folded->n); + const OnigCodePoint *next = folded->code; + MODIFIED; + if (count==1) + code = *next; + } + } } to += ONIGENC_CODE_TO_MBC(enc, code, to); /* switch from titlecase to lowercase for capitalize */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/