Qt 4.8
Enumerations | Functions
qutfcodec.cpp File Reference
#include "qutfcodec_p.h"
#include "qlist.h"
#include "qendian.h"
#include "qchar.h"

Go to the source code of this file.

Enumerations

enum  { Endian = 0, Data = 1 }
 

Functions

static bool isUnicodeNonCharacter (uint ucs4)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
Endian 
Data 

Definition at line 49 of file qutfcodec.cpp.

49 { Endian = 0, Data = 1 };

Function Documentation

◆ isUnicodeNonCharacter()

static bool isUnicodeNonCharacter ( uint  ucs4)
inlinestatic

Definition at line 51 of file qutfcodec.cpp.

Referenced by QUtf8::convertFromUnicode(), and QUtf8::convertToUnicode().

52 {
53  // Unicode has a couple of "non-characters" that one can use internally,
54  // but are not allowed to be used for text interchange.
55  //
56  // Those are the last two entries each Unicode Plane (U+FFFE, U+FFFF,
57  // U+1FFFE, U+1FFFF, etc.) as well as the entries between U+FDD0 and
58  // U+FDEF (inclusive)
59 
60  return (ucs4 & 0xfffe) == 0xfffe
61  || (ucs4 - 0xfdd0U) < 16;
62 }