Unlike English, both languages incorporate symbols rather than just an alphabet. To be sure, Japanese does have a phonetic alphabet, two in fact. It also uses Chinese characters called kanji. Kanji, as well as Japan's two phonetic alphabets (hiragana and katakana) were derived from Chinese characters.
Japanese names are usually written in kanji (Chinese characters), although some names use hiragana or even katakana, or a mixture of kanji and kana.
While most of the Japanese characters are still the same as the traditional Chinese characters and mostly with similar meanings, there are some differences: Japanese Kanji has two different pronunciation systems for Chinese characters: “kun'yomi” (for original Japanese words) and “on'yomi” (for borrowed Chinese words).
I need a way to check whether a string contains Japanese or Chinese text.
Currently I'm using this:
string.match(/[\u3400-\u9FBF]/);
but it does not work with this for example: ディアボリックラヴァーズ
or バッテリー
.
Could you help me with that?
Thanks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With