aboutsummaryrefslogtreecommitdiffstats
path: root/enc/unicode.c
diff options
context:
space:
mode:
Diffstat (limited to 'enc/unicode.c')
-rw-r--r--enc/unicode.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/enc/unicode.c b/enc/unicode.c
index 22d1dda809..5a9aea0fa7 100644
--- a/enc/unicode.c
+++ b/enc/unicode.c
@@ -701,7 +701,7 @@ onigenc_unicode_case_map(OnigCaseFoldType* flagP,
const CodePointList3 *folded;
if (code==I_WITH_DOT_ABOVE) {
- if (flags&ONIGENC_CASE_DOWNCASE) {
+ if (flags&(ONIGENC_CASE_DOWNCASE|ONIGENC_CASE_FOLD)) {
MODIFIED;
code = 'i';
if (!(flags&ONIGENC_CASE_FOLD_TURKISH_AZERI)) { /* make dot above explicit */
@@ -710,6 +710,10 @@ onigenc_unicode_case_map(OnigCaseFoldType* flagP,
}
}
}
+ else if (code==DOTLESS_i) { /* handle this manually, because it isn't involved in folding */
+ if (flags&ONIGENC_CASE_UPCASE)
+ MODIFIED, code = 'I';
+ }
else if ((folded = onigenc_unicode_fold_lookup(code)) != 0) { /* data about character found in CaseFold_11_Table */
if ((flags&ONIGENC_CASE_TITLECASE) /* Titlecase needed, */
&& (OnigCaseFoldFlags(folded->n)&ONIGENC_CASE_IS_TITLECASE)) { /* but already Titlecase */