47 virtual void setBuffer(
const char* buf,
int length )
50 bufferLength_ = length;
47 virtual void setBuffer(
const char* buf,
int length ) {
…}
54 virtual const char*
buffer()
const {
return bufferRef_; }
59 virtual void setPreferedCodec(
TextCodec* codec=0 );
63 virtual void setFallbackCodec(
TextCodec* codec=0 );
89 static bool hasUTF8Bom(
const char* buffer,
int length );
90 static bool hasUTF16LEBom(
const char* buffer,
int length );
91 static bool hasUTF16BEBom(
const char* buffer,
int length );
92 static bool hasUTF32LEBom(
const char* buffer,
int length );
93 static bool hasUTF32BEBom(
const char* buffer,
int length );
99 const char* bufferRef_;
TextCodecDetector(const QByteArray *buffer=0, TextCodec *preferedCodec=0)
Definition textcodecdetector.cpp:41
virtual bool isContinuationChar(char b)
If the byte has the form 10xxxxx, then it's a continuation byte of a multiple byte character;.
Definition textcodecdetector.h:71
virtual bool isFourBytesSequence(char b)
If the byte has the form 11110xx, then it's the first byte of a four-bytes sequence character.
Definition textcodecdetector.h:80
virtual TextCodec * fallbackCodec() const
Definition textcodecdetector.h:64
static TextCodec * globalPreferedCodec()
return the static global prefered codec
Definition textcodecdetector.cpp:25
virtual TextCodec * preferedCodec()
Definition textcodecdetector.h:60
virtual bool isFiveBytesSequence(char b)
If the byte has the form 11110xx, then it's the first byte of a five-bytes sequence character.
Definition textcodecdetector.h:83
virtual bool isSixBytesSequence(char b)
Definition textcodecdetector.h:86
virtual TextCodec * detectCodec()
Detects the encoding of the provided buffer. If Byte Order Markers are encountered at the beginning o...
Definition textcodecdetector.cpp:120
static void setGlobalPreferedCodec(TextCodec *codec)
Definition textcodecdetector.cpp:34
virtual bool isThreeBytesSequence(char b)
If the byte has the form 1110xxx, then it's the first byte of a three-bytes sequence character.
Definition textcodecdetector.h:77
virtual int bufferLength()
Returns the buffer length.
Definition textcodecdetector.h:57
virtual bool isTwoBytesSequence(char b)
If the byte has the form 110xxxx, then it's the first byte of a two-bytes sequence character.
Definition textcodecdetector.h:74
virtual const char * buffer() const
Returns the buffer reference.
Definition textcodecdetector.h:54
virtual void setBuffer(const char *buf, int length)
Sets the buffer reference.
Definition textcodecdetector.h:47
This class represents a single text codec The codec has a name and contains methods to create encoder...
Definition textcodec.h:38
#define EDBEE_EXPORT
Definition exports.h:15
QT Acessibility has an issue with reporting blank lines between elements lines. defining 'WINDOWS_EMP...
Definition commentcommand.cpp:20