0

I need a way to check if characters in a string input are cjk, I've searched and I've only been able to detect if the characters are multibyte, however, I need to be able to tell Japanese, chinese or korean characters apart from other multibyte-encoded character.

The string encoding is utf8 and it'd be simpler to keep it that way, but I welcome any solution.

I've tried writing out the bytes and using information found here to determine the size and bit-content of the characters. perhaps if there was a continous range of digits for representing cjk chars, not sure it'd be that simple however.

adoDojo
  • 31
  • 3
  • 1
    Might have a look here if that applicable (question is for chinese only, thoug): https://stackoverflow.com/questions/16228329/check-whether-a-cstring-contains-only-chinese-characters – nick Nov 17 '22 at 11:20
  • 1
    Here are more about the ranges you need to check against: https://stackoverflow.com/questions/1366068/whats-the-complete-range-for-chinese-characters-in-unicode – Ranoiaetep Nov 17 '22 at 11:44

0 Answers0