56 #ifndef QT_NO_TEXTCODEC 61 #define IsKana(c) (((c) >= 0xa1) && ((c) <= 0xdf)) 62 #define IsSjisChar1(c) ((((c) >= 0x81) && ((c) <= 0x9f)) || \ 63 (((c) >= 0xe0) && ((c) <= 0xfc))) 64 #define IsSjisChar2(c) (((c) >= 0x40) && ((c) != 0x7f) && ((c) <= 0xfc)) 65 #define IsUserDefinedChar1(c) (((c) >= 0xf0) && ((c) <= 0xfc)) 67 #define QValidChar(u) ((u) ? QChar((ushort)(u)) : QChar(QChar::ReplacementCharacter)) 90 char replacement =
'?';
101 for (
int i = 0; i < len; i++) {
104 if (ch.
row() == 0x00 && ch.
cell() < 0x80) {
106 *cursor++ = ch.
cell();
112 *cursor++ = (j >> 8);
113 *cursor++ = (j & 0xff);
116 *cursor++ = (j >> 8);
117 *cursor++ = (j & 0xff);
120 *cursor++ = (j >> 8);
121 *cursor++ = (j & 0xff);
128 *cursor++ = replacement;
154 for (
int i=0; i<len; i++) {
170 result += replacement;
190 result += replacement;
227 #endif // QT_NO_TEXTCODEC uint unicodeToSjis(uint h, uint l) const
virtual uint unicodeToJisx0212(uint h, uint l) const
static QByteArray _name()
#define QT_END_NAMESPACE
This macro expands to.
uint unicodeToJisx0201(uint h, uint l) const
char * data()
Returns a pointer to the data stored in the byte array.
QSjisCodec()
Creates a Shift-JIS codec.
The QByteArray class provides an array of bytes.
#define IsUserDefinedChar1(c)
The QString class provides a Unicode character string.
uint unicodeToSjisibmvdc(uint h, uint l) const
const QJpUnicodeConv * conv
The QChar class provides a 16-bit Unicode character.
static const uint Default
~QSjisCodec()
Destroys the Shift-JIS codec.
#define QT_BEGIN_NAMESPACE
This macro expands to.
uint jisx0201ToUnicode(uint h, uint l) const
uint sjisibmvdcToUnicode(uint h, uint l) const
const char * constData() const
Returns a pointer to the data stored in the byte array.
uint cp932ToUnicode(uint h, uint l) const
void resize(int size)
Sets the size of the byte array to size bytes.
uchar cell() const
Returns the cell (least significant byte) of the Unicode character.
QString convertToUnicode(const char *, int, ConverterState *) const
QTextCodec subclasses must reimplement this function.
uint sjisToUnicode(uint h, uint l) const
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const
QTextCodec subclasses must reimplement this function.
static QList< QByteArray > _aliases()
Returns the codec's mime name.
uint unicodeToCp932(uint h, uint l) const
uchar row() const
Returns the row (most significant byte) of the Unicode character.