| 31 | |
| 32 | |
| 33 | static bool IsHangul(const QChar qchar) |
| 34 | { |
| 35 | int unicode = (int)qchar.unicode(); |
| 36 | // Korean character ranges used for preedit chars. |
| 37 | // http://www.programminginkorean.com/programming/hangul-in-unicode/ |
| 38 | const bool HangulJamo = (0x1100 <= unicode && unicode <= 0x11FF); |
| 39 | const bool HangulCompatibleJamo = (0x3130 <= unicode && unicode <= 0x318F); |
| 40 | const bool HangulJamoExtendedA = (0xA960 <= unicode && unicode <= 0xA97F); |
| 41 | const bool HangulJamoExtendedB = (0xD7B0 <= unicode && unicode <= 0xD7FF); |
| 42 | const bool HangulSyllable = (0xAC00 <= unicode && unicode <= 0xD7A3); |
| 43 | return HangulJamo || HangulCompatibleJamo || HangulSyllable || |
| 44 | HangulJamoExtendedA || HangulJamoExtendedB; |
| 45 | } |
| 46 | |
| 47 | static void MoveImeCarets(QsciScintillaQt *sqt, int offset) |
| 48 | { |