Check If A Character Is Traditional Chinese In Big-5 (java)?
I have a thermal printer, which supports only Traditional Chinese characters other than Latin. Is there any way to check, that given a CJK character in Unicode, whether it is a val
Solution 1:
The checks you were doing in your code (and Java itself) uses Unicode (not Big-5) encoding to encode traditional Chinese text. See this page for a conversion list between the encodings, or this site for a lookup.
There is no easy way that I know of to test that Chinese text is Traditional. You could check if the characters fall between 0xA140
and 0xF9D5
(apparently the Big 5 range from the link I gave above), but Unicode also has overlapping encoding in this range.
See also Differentiating CJK languages (Chinese, Japanese, Korean) in Android
Post a Comment for "Check If A Character Is Traditional Chinese In Big-5 (java)?"