--- a/src/corelib/tools/qchar.h Mon Jun 21 22:38:13 2010 +0100
+++ b/src/corelib/tools/qchar.h Thu Jul 22 16:41:55 2010 +0100
@@ -285,6 +285,15 @@
inline void setCell(uchar cell);
inline void setRow(uchar row);
+ static inline bool isHighSurrogate(uint ucs4) {
+ return ((ucs4 & 0xfffffc00) == 0xd800);
+ }
+ static inline bool isLowSurrogate(uint ucs4) {
+ return ((ucs4 & 0xfffffc00) == 0xdc00);
+ }
+ static inline bool requiresSurrogates(uint ucs4) {
+ return (ucs4 >= 0x10000);
+ }
static inline uint surrogateToUcs4(ushort high, ushort low) {
return (uint(high)<<10) + low - 0x35fdc00;
}