80 #ifndef QT_NO_TEXTCODEC 85 #define IsKana(c) (((c) >= 0xa1) && ((c) <= 0xdf)) 86 #define IsEucChar(c) (((c) >= 0xa1) && ((c) <= 0xfe)) 88 #define QValidChar(u) ((u) ? QChar((ushort)(u)) : QChar(QChar::ReplacementCharacter)) 108 char replacement =
'?';
115 int rlen = 3*len + 1;
119 for (
int i = 0; i < len; i++) {
124 *cursor++ = ch.
cell();
136 *cursor++ = (j >> 8) | 0x80;
137 *cursor++ = (j & 0xff) | 0x80;
141 *cursor++ = (j >> 8) | 0x80;
142 *cursor++ = (j & 0xff) | 0x80;
145 *cursor++ = replacement;
160 uchar buf[2] = {0, 0};
173 for (
int i=0; i<len; i++) {
180 }
else if (ch ==
Ss2 || ch ==
Ss3) {
190 result += replacement;
201 result += replacement;
205 }
else if (buf[0] ==
Ss3) {
212 result += replacement;
223 result += replacement;
235 result += replacement;
259 #endif // QT_NO_TEXTCODEC
virtual uint unicodeToJisx0212(uint h, uint l) const
#define QT_END_NAMESPACE
This macro expands to.
uint unicodeToJisx0201(uint h, uint l) const
virtual uint jisx0208ToUnicode(uint h, uint l) const
char * data()
Returns a pointer to the data stored in the byte array.
ushort unicode() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
The QByteArray class provides an array of bytes.
The QString class provides a Unicode character string.
The QChar class provides a 16-bit Unicode character.
static const uint Default
const QJpUnicodeConv * conv
#define QT_BEGIN_NAMESPACE
This macro expands to.
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const
QTextCodec subclasses must reimplement this function.
uint jisx0201ToUnicode(uint h, uint l) const
virtual uint jisx0212ToUnicode(uint h, uint l) const
~QEucJpCodec()
Destroys the codec.
const char * constData() const
Returns a pointer to the data stored in the byte array.
void resize(int size)
Sets the size of the byte array to size bytes.
virtual uint unicodeToJisx0208(uint h, uint l) const
uchar cell() const
Returns the cell (least significant byte) of the Unicode character.
static QByteArray _name()
uchar row() const
Returns the row (most significant byte) of the Unicode character.
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
QEucJpCodec()
Constructs a QEucJpCodec.
QString convertToUnicode(const char *, int, ConverterState *) const
QTextCodec subclasses must reimplement this function.