From: Urban Wallasch Date: Sat, 26 Jun 2021 11:42:27 +0000 (+0200) Subject: * Added full width Latin characters to set of japanese characters. X-Git-Tag: v0.1.0~29 X-Git-Url: https://git.packet-gain.de/?a=commitdiff_plain;h=1f3b79fffa9317e1bb47848e52943553c6ca4d27;p=jiten-pai.git * Added full width Latin characters to set of japanese characters. --- diff --git a/jiten-pai.py b/jiten-pai.py index da4cb6c..7753139 100755 --- a/jiten-pai.py +++ b/jiten-pai.py @@ -52,9 +52,10 @@ def eprint(*args, **kwargs): # Note: we only test for common CJK ideographs _u_CJK_Uni = r'\u4e00-\u9FFF' _u_CJK_Kana = r'\u3040-\u30ff' +_u_CJK_FullHalf = r'\uFF00-\uFFEF' _re_kanji = re.compile('^[' + _u_CJK_Uni + ']$') -_re_jap = re.compile('[' + _u_CJK_Uni + _u_CJK_Kana + ']') +_re_jap = re.compile('[' + _u_CJK_Uni + _u_CJK_Kana + _u_CJK_FullHalf + ']') # test, if a single character /might/ be a kanji def _is_kanji(s):