From What is the full range for Chinese characters in Unicode? Unicode CJK ranges:
- 4E00-9FFF (general)
- 3400-4DFF (rare)
- F900-FAFF (Compatibility - Duplicates, Unified Options, Corporate Symbols).
- 20000-2A6DF (rare, historical)
- 2F800-2FA1F (compatibility - addition)
Since JS strings only support UCS-2, the highest of which are in FFFF, the last two ranges are probably not of much interest. Thus, if you create a JS string, you should filter out Chinese characters using something like:
replace(/[\u4e00-\u9fff\u3400-\u4dff\uf900-\ufaff]/g, '')
source share