summaryrefslogtreecommitdiff
path: root/src/euc_tw.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/euc_tw.c')
-rw-r--r--src/euc_tw.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/euc_tw.c b/src/euc_tw.c
index f757961..4e07567 100644
--- a/src/euc_tw.c
+++ b/src/euc_tw.c
@@ -54,6 +54,12 @@ euctw_mbc_enc_len(const UChar* p)
return EncLen_EUCTW[*p];
}
+static int
+is_valid_mbc_string(const UChar* s, const UChar* end)
+{
+ return onigenc_length_check_is_valid_mbc_string(ONIG_ENCODING_EUC_TW, s, end);
+}
+
static OnigCodePoint
euctw_mbc_to_code(const UChar* p, const UChar* end)
{
@@ -127,5 +133,6 @@ OnigEncodingType OnigEncodingEUC_TW = {
euctw_left_adjust_char_head,
euctw_is_allowed_reverse_match,
NULL, /* init */
- NULL /* is_initialized */
+ NULL, /* is_initialized */
+ is_valid_mbc_string
};