In Java, I was able to determine if a particular character was for example, a Japanese Kanji using Unicode.blockOf(Character). I’m trying to do the same for a QChar, but couldn’t find a relevant function to do this. I’m wondering if I just missed it, or will I have to roll my own, and if so – how?
Share
There is QChar::Category however it does not provide everything you need.
For checking whether a char is in certain range, you could write a function like this:
You could then use it like this:
Of course you could go further and make it more abstract and enumerate the ranges:
And here is the list of the Unicode Blocks