(char)
| 1 | def 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 | |
| 19 | def isStringCjk(string): |