diff --git a/src/org/joni/ApplyCaseFold.java b/src/org/joni/ApplyCaseFold.java index 7dd84ce1..6a8d1c35 100644 --- a/src/org/joni/ApplyCaseFold.java +++ b/src/org/joni/ApplyCaseFold.java @@ -41,7 +41,7 @@ public void apply(int from, int[]to, int length, Object o) { if (Config.CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS) { if ((inCC && !cc.isNot()) || (!inCC && cc.isNot())) { - if (enc.minLength() > 1 || to[0] >= BitSet.SINGLE_BYTE_SIZE) { + if (enc.minLength() > 1 || to[0] >= BitSet.SINGLE_BYTE_SIZE || enc.codeToMbcLength(to[0]) > 1) { cc.addCodeRange(env, to[0], to[0]); } else { /* /(?i:[^A-C])/.match("a") ==> fail. */