aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-19 03:45:32 +0000
committerduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-19 03:45:32 +0000
commitc0051abc933eef3d10c553e13f4eb71f2ae8e416 (patch)
tree37a4ec0f486b2efb1a10546ef9c265d2a40e8c8b
parent8d90ffeef4b761b877e314cbda4217c51cbf2114 (diff)
downloadruby-c0051abc933eef3d10c553e13f4eb71f2ae8e416.tar.gz
* enc/unicode.c: Activated use of case mapping data in CaseUnfold_11 array.
(with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--enc/unicode.c9
2 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index fce9a0e8ae..13de019257 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Feb 19 12:44:57 2016 Martin Duerst <duerst@it.aoyama.ac.jp>
+
+ * 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@ruby-lang.org>
* ext/extmk.rb: add cygwin case, nothing excluded.
diff --git a/enc/unicode.c b/enc/unicode.c
index 96294f7c3c..2170301985 100644
--- a/enc/unicode.c
+++ b/enc/unicode.c
@@ -698,6 +698,15 @@ onigenc_unicode_case_map(OnigCaseFoldType* flagP,
}
}
}
+ 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 */