javascript - Can I detect non-japanese chinese characters in text -


I have some text that is in Japanese, but some non-Japanese Chinese characters mixed in it. I looked at it because the Japanese does not support the font I use and the browser offers them using a different font. As far as I have seen that those letters are not used in Japanese, they accidentally meet (text comes from OCR). I wanted to find Kanji in the lesson, but it seems that not all Chinese characters are Kanji, but only Kanji. Is there any reliable way to detect those non-Japanese characters, such as checking some sections of Unicode?

The only solution I can think of is that he is using a complete list of Kanji (or more searching) in use and checking every character if it is in the list, but I doubt It may be a little slow but even if I do not find a better way of getting it, then maybe I'll solve it in this way.

Is there any reliable way to detect non-Japanese characters such as Unicode To check out some sections?

No. For example, to support all your characters in your font, you only have to explain all Japanese characters:

(...) Checking each character if it is in the list But I suspect it might be a bit slow.

Do not use the list, use the hashaseet and if you really want a list, then sort it and use binary search it should not be too slow.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -