summaryrefslogtreecommitdiff
path: root/src/euc_kr.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-08-31 03:42:05 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-08-31 03:42:05 +0200
commita76fa337cc657dbe669ffb8dbdac606d4d6616f1 (patch)
treea6f004237df60876d087f79ac369fdc2545697c9 /src/euc_kr.c
parent5e01a4852b31d537307994248869caf38b4023cc (diff)
Imported Upstream version 6.1.0upstream/6.1.0
Diffstat (limited to 'src/euc_kr.c')
-rw-r--r--src/euc_kr.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/euc_kr.c b/src/euc_kr.c
index 769104b..12803cd 100644
--- a/src/euc_kr.c
+++ b/src/euc_kr.c
@@ -54,6 +54,12 @@ euckr_mbc_enc_len(const UChar* p)
return EncLen_EUCKR[*p];
}
+static int
+is_valid_mbc_string(const UChar* s, const UChar* end)
+{
+ return onigenc_length_check_is_valid_mbc_string(ONIG_ENCODING_EUC_KR, s, end);
+}
+
static OnigCodePoint
euckr_mbc_to_code(const UChar* p, const UChar* end)
{
@@ -136,7 +142,8 @@ OnigEncodingType OnigEncodingEUC_KR = {
euckr_left_adjust_char_head,
euckr_is_allowed_reverse_match,
NULL, /* init */
- NULL /* is_initialized */
+ NULL, /* is_initialized */
+ is_valid_mbc_string
};
/* Same with OnigEncodingEUC_KR except the name */
@@ -158,5 +165,6 @@ OnigEncodingType OnigEncodingEUC_CN = {
euckr_left_adjust_char_head,
euckr_is_allowed_reverse_match,
NULL, /* init */
- NULL /* is_initialized */
+ NULL, /* is_initialized */
+ is_valid_mbc_string
};