MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / isCharCjk

Function isCharCjk

utils/cjk.py:1–16  ·  view source on GitHub ↗
(char)

Source from the content-addressed store, hash-verified

1def isCharCjk(char):
2 # https://stackoverflow.com/questions/1366068/whats-the-complete-range-for-chinese-characters-in-unicode
3 ranges = (
4 ('\u4e00', '\u9fff'),
5 ('\u3400', '\u4dbf'),
6 ('\u20000', '\u2a6df'),
7 ('\u2a700', '\u2b73f'),
8 ('\u2b740', '\u2b81f'),
9 ('\u2b820', '\u2ceaf'),
10 ('\uf900', '\ufaff'),
11 ('\u2f800', '\u2fa1f'),
12 ('\uac00', '\ud7af'))
13 for low, high in ranges:
14 if low <= char <= high:
15 return True
16 return False
17
18
19def isStringCjk(string):

Callers 1

isStringCjkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected