56 #ifndef QT_NO_TEXTCODEC 68 #define IsKana(c) (((c) >= 0xa1) && ((c) <= 0xdf)) 69 #define IsJisChar(c) (((c) >= 0x21) && ((c) <= 0x7e)) 71 #define QValidChar(u) ((u) ? QChar((ushort)(u)) : QChar(QChar::ReplacementCharacter)) 109 char replacement =
'?';
119 for (
int i = 0; i < len; i++) {
122 if (ch.
row() == 0x00 && ch.
cell() < 0x80) {
132 if (state !=
Ascii ||
164 result += (j >> 8) & 0xff;
180 uchar buf[4] = {0, 0, 0, 0};
200 for (
int i=0; i<len; i++) {
207 if (ch ==
'$' || strchr(
Esc_CHARS, ch)) {
265 }
else if (ch ==
So) {
270 }
else if (ch ==
Si) {
319 result += replacement;
333 cs->
state_data[0] = (buf[0] << 24) + (buf[1] << 16) + (buf[2] << 8) + buf[3];
352 return "ISO-2022-JP";
365 #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
static const char Esc_JISX0201_Latin[]
static const char Esc_JISX0201_Kana[]
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
#define QT_BEGIN_NAMESPACE
This macro expands to.
QString convertToUnicode(const char *, int, ConverterState *) const
QTextCodec subclasses must reimplement this function.
uint jisx0201ToUnicode(uint h, uint l) const
static const char Esc_CHARS[]
static QList< QByteArray > _aliases()
Returns the codec's mime name.
static const char *const Esc_SEQ[]
virtual uint jisx0212ToUnicode(uint h, uint l) const
static const char Esc_JISX0208_1983[]
static const char Esc_JISX0208_1978[]
static const char Esc_JISX0212[]
virtual uint unicodeToJisx0208(uint h, uint l) const
uchar cell() const
Returns the cell (least significant byte) of the Unicode character.
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const
QTextCodec subclasses must reimplement this function.
static QByteArray _name()
static const char Esc_Ascii[]
uchar row() const
Returns the row (most significant byte) of the Unicode character.
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
const QJpUnicodeConv * conv