summaryrefslogtreecommitdiff
path: root/src/koi8_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/koi8_r.c')
-rw-r--r--src/koi8_r.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/koi8_r.c b/src/koi8_r.c
index c77302f..31cc870 100644
--- a/src/koi8_r.c
+++ b/src/koi8_r.c
@@ -2,7 +2,7 @@
koi8_r.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2019 K.Kosako
+ * Copyright (c) 2002-2020 K.Kosako
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -109,7 +109,11 @@ koi8_r_mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED,
{
const UChar* p = *pp;
- *lower = ENC_KOI8_R_TO_LOWER_CASE(*p);
+ if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag) || ONIGENC_IS_ASCII_CODE(*p))
+ *lower = ENC_KOI8_R_TO_LOWER_CASE(*p);
+ else
+ *lower = *p;
+
(*pp)++;
return 1;
}