summaryrefslogtreecommitdiff
path: root/src/sjis.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sjis.c')
-rw-r--r--src/sjis.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/sjis.c b/src/sjis.c
index 84843ae..a607b3d 100644
--- a/src/sjis.c
+++ b/src/sjis.c
@@ -77,6 +77,12 @@ mbc_enc_len(const UChar* p)
}
static int
+is_valid_mbc_string(const UChar* s, const UChar* end)
+{
+ return onigenc_length_check_is_valid_mbc_string(ONIG_ENCODING_SJIS, s, end);
+}
+
+static int
code_to_mbclen(OnigCodePoint code)
{
if (code < 256) {
@@ -303,5 +309,6 @@ OnigEncodingType OnigEncodingSJIS = {
left_adjust_char_head,
is_allowed_reverse_match,
NULL, /* init */
- NULL /* is_initialized */
+ NULL, /* is_initialized */
+ is_valid_mbc_string
};