56 #define IsTSCIIChar(c) (((c) >= 0x80) && ((c) <= 0xfd)) 78 char replacement =
'?';
87 for (
int i = 0; i < len; i++) {
90 if (ch.
row() == 0x00 && ch.
cell() < 0x80) {
95 uc[i + 2].unicode()))) {
99 uc[i + 1].unicode(), 0))) {
133 for (
int i = 0; i < len; i++) {
148 result += replacement;
154 result += replacement;
189 {0x00A0, 0x0000, 0x0000, 0xA0},
190 {0x00A9, 0x0000, 0x0000, 0xA9},
191 {0x0B83, 0x0000, 0x0000, 0xB7},
192 {0x0B85, 0x0000, 0x0000, 0xAB},
193 {0x0B86, 0x0000, 0x0000, 0xAC},
194 {0x0B87, 0x0000, 0x0000, 0xAD},
195 {0x0B88, 0x0000, 0x0000, 0xAE},
196 {0x0B89, 0x0000, 0x0000, 0xAF},
197 {0x0B8A, 0x0000, 0x0000, 0xB0},
198 {0x0B8E, 0x0000, 0x0000, 0xB1},
199 {0x0B8F, 0x0000, 0x0000, 0xB2},
200 {0x0B90, 0x0000, 0x0000, 0xB3},
201 {0x0B92, 0x0000, 0x0000, 0xB4},
202 {0x0B93, 0x0000, 0x0000, 0xB5},
203 {0x0B94, 0x0000, 0x0000, 0xB6},
204 {0x0B95, 0x0000, 0x0000, 0xB8},
205 {0x0B95, 0x0B82, 0x0000, 0xEC},
206 {0x0B95, 0x0BC1, 0x0000, 0xCC},
207 {0x0B95, 0x0BC2, 0x0000, 0xDC},
208 {0x0B99, 0x0000, 0x0000, 0xB9},
209 {0x0B99, 0x0B82, 0x0000, 0xED},
210 {0x0B99, 0x0BC1, 0x0000, 0x99},
211 {0x0B99, 0x0BC2, 0x0000, 0x9B},
212 {0x0B9A, 0x0000, 0x0000, 0xBA},
213 {0x0B9A, 0x0B82, 0x0000, 0xEE},
214 {0x0B9A, 0x0BC1, 0x0000, 0xCD},
215 {0x0B9A, 0x0BC2, 0x0000, 0xDD},
216 {0x0B9C, 0x0000, 0x0000, 0x83},
217 {0x0B9C, 0x0B82, 0x0000, 0x88},
218 {0x0B9E, 0x0000, 0x0000, 0xBB},
219 {0x0B9E, 0x0B82, 0x0000, 0xEF},
220 {0x0B9E, 0x0BC1, 0x0000, 0x9A},
221 {0x0B9E, 0x0BC2, 0x0000, 0x9C},
222 {0x0B9F, 0x0000, 0x0000, 0xBC},
223 {0x0B9F, 0x0B82, 0x0000, 0xF0},
224 {0x0B9F, 0x0BBF, 0x0000, 0xCA},
225 {0x0B9F, 0x0BC0, 0x0000, 0xCB},
226 {0x0B9F, 0x0BC1, 0x0000, 0xCE},
227 {0x0B9F, 0x0BC2, 0x0000, 0xDE},
228 {0x0BA1, 0x0B82, 0x0000, 0xF2},
229 {0x0BA3, 0x0000, 0x0000, 0xBD},
230 {0x0BA3, 0x0B82, 0x0000, 0xF1},
231 {0x0BA3, 0x0BC1, 0x0000, 0xCF},
232 {0x0BA3, 0x0BC2, 0x0000, 0xDF},
233 {0x0BA4, 0x0000, 0x0000, 0xBE},
234 {0x0BA4, 0x0BC1, 0x0000, 0xD0},
235 {0x0BA4, 0x0BC2, 0x0000, 0xE0},
236 {0x0BA8, 0x0000, 0x0000, 0xBF},
237 {0x0BA8, 0x0B82, 0x0000, 0xF3},
238 {0x0BA8, 0x0BC1, 0x0000, 0xD1},
239 {0x0BA8, 0x0BC2, 0x0000, 0xE1},
240 {0x0BA9, 0x0000, 0x0000, 0xC9},
241 {0x0BA9, 0x0B82, 0x0000, 0xFD},
242 {0x0BA9, 0x0BC1, 0x0000, 0xDB},
243 {0x0BA9, 0x0BC2, 0x0000, 0xEB},
244 {0x0BAA, 0x0000, 0x0000, 0xC0},
245 {0x0BAA, 0x0B82, 0x0000, 0xF4},
246 {0x0BAA, 0x0BC1, 0x0000, 0xD2},
247 {0x0BAA, 0x0BC2, 0x0000, 0xE2},
248 {0x0BAE, 0x0000, 0x0000, 0xC1},
249 {0x0BAE, 0x0B82, 0x0000, 0xF5},
250 {0x0BAE, 0x0BC1, 0x0000, 0xD3},
251 {0x0BAE, 0x0BC2, 0x0000, 0xE3},
252 {0x0BAF, 0x0000, 0x0000, 0xC2},
253 {0x0BAF, 0x0B82, 0x0000, 0xF6},
254 {0x0BAF, 0x0BC1, 0x0000, 0xD4},
255 {0x0BAF, 0x0BC2, 0x0000, 0xE4},
256 {0x0BB0, 0x0000, 0x0000, 0xC3},
257 {0x0BB0, 0x0B82, 0x0000, 0xF7},
258 {0x0BB0, 0x0BC1, 0x0000, 0xD5},
259 {0x0BB0, 0x0BC2, 0x0000, 0xE5},
260 {0x0BB1, 0x0000, 0x0000, 0xC8},
261 {0x0BB1, 0x0B82, 0x0000, 0xFC},
262 {0x0BB1, 0x0BC1, 0x0000, 0xDA},
263 {0x0BB1, 0x0BC2, 0x0000, 0xEA},
264 {0x0BB2, 0x0000, 0x0000, 0xC4},
265 {0x0BB2, 0x0B82, 0x0000, 0xF8},
266 {0x0BB2, 0x0BC1, 0x0000, 0xD6},
267 {0x0BB2, 0x0BC2, 0x0000, 0xE6},
268 {0x0BB3, 0x0000, 0x0000, 0xC7},
269 {0x0BB3, 0x0B82, 0x0000, 0xFB},
270 {0x0BB3, 0x0BC1, 0x0000, 0xD9},
271 {0x0BB3, 0x0BC2, 0x0000, 0xE9},
272 {0x0BB4, 0x0000, 0x0000, 0xC6},
273 {0x0BB4, 0x0B82, 0x0000, 0xFA},
274 {0x0BB4, 0x0BC1, 0x0000, 0xD8},
275 {0x0BB4, 0x0BC2, 0x0000, 0xE8},
276 {0x0BB5, 0x0000, 0x0000, 0xC5},
277 {0x0BB5, 0x0B82, 0x0000, 0xF9},
278 {0x0BB5, 0x0BC1, 0x0000, 0xD7},
279 {0x0BB5, 0x0BC2, 0x0000, 0xE7},
280 {0x0BB7, 0x0000, 0x0000, 0x84},
281 {0x0BB7, 0x0B82, 0x0000, 0x89},
282 {0x0BB8, 0x0000, 0x0000, 0x85},
283 {0x0BB8, 0x0B82, 0x0000, 0x8A},
284 {0x0BB9, 0x0000, 0x0000, 0x86},
285 {0x0BB9, 0x0B82, 0x0000, 0x8B},
286 {0x0BBE, 0x0000, 0x0000, 0xA1},
287 {0x0BBF, 0x0000, 0x0000, 0xA2},
288 {0x0BC0, 0x0000, 0x0000, 0xA3},
289 {0x0BC1, 0x0000, 0x0000, 0xA4},
290 {0x0BC2, 0x0000, 0x0000, 0xA5},
291 {0x0BC6, 0x0000, 0x0000, 0xA6},
292 {0x0BC7, 0x0000, 0x0000, 0xA7},
293 {0x0BC8, 0x0000, 0x0000, 0xA8},
294 {0x0BCC, 0x0000, 0x0000, 0xAA},
295 {0x0BE6, 0x0000, 0x0000, 0x80},
296 {0x0BE7, 0x0000, 0x0000, 0x81},
297 {0x0BE7, 0x0BB7, 0x0000, 0x87},
298 {0x0BE7, 0x0BB7, 0x0B82, 0x8C},
299 {0x0BE8, 0x0000, 0x0000, 0x8D},
300 {0x0BE9, 0x0000, 0x0000, 0x8E},
301 {0x0BEA, 0x0000, 0x0000, 0x8F},
302 {0x0BEB, 0x0000, 0x0000, 0x90},
303 {0x0BEC, 0x0000, 0x0000, 0x95},
304 {0x0BED, 0x0000, 0x0000, 0x96},
305 {0x0BEE, 0x0000, 0x0000, 0x97},
306 {0x0BEF, 0x0000, 0x0000, 0x98},
307 {0x0BF0, 0x0000, 0x0000, 0x9D},
308 {0x0BF1, 0x0000, 0x0000, 0x9E},
309 {0x0BF2, 0x0000, 0x0000, 0x9F},
310 {0x2018, 0x0000, 0x0000, 0x91},
311 {0x2019, 0x0000, 0x0000, 0x92},
312 {0x201C, 0x0000, 0x0000, 0x93},
313 {0x201C, 0x0000, 0x0000, 0x94}
318 {0x0BE6, 0x0000, 0x0000},
319 {0x0BE7, 0x0000, 0x0000},
320 {0x0000, 0x0000, 0x0000},
321 {0x0B9C, 0x0000, 0x0000},
322 {0x0BB7, 0x0000, 0x0000},
323 {0x0BB8, 0x0000, 0x0000},
324 {0x0BB9, 0x0000, 0x0000},
325 {0x0BE7, 0x0BB7, 0x0000},
326 {0x0B9C, 0x0B82, 0x0000},
327 {0x0BB7, 0x0B82, 0x0000},
328 {0x0BB8, 0x0B82, 0x0000},
329 {0x0BB9, 0x0B82, 0x0000},
330 {0x0BE7, 0x0BB7, 0x0B82},
331 {0x0BE8, 0x0000, 0x0000},
332 {0x0BE9, 0x0000, 0x0000},
333 {0x0BEA, 0x0000, 0x0000},
334 {0x0BEB, 0x0000, 0x0000},
335 {0x2018, 0x0000, 0x0000},
336 {0x2019, 0x0000, 0x0000},
337 {0x201C, 0x0000, 0x0000},
338 {0x201C, 0x0000, 0x0000},
339 {0x0BEC, 0x0000, 0x0000},
340 {0x0BED, 0x0000, 0x0000},
341 {0x0BEE, 0x0000, 0x0000},
342 {0x0BEF, 0x0000, 0x0000},
343 {0x0B99, 0x0BC1, 0x0000},
344 {0x0B9E, 0x0BC1, 0x0000},
345 {0x0B99, 0x0BC2, 0x0000},
346 {0x0B9E, 0x0BC2, 0x0000},
347 {0x0BF0, 0x0000, 0x0000},
348 {0x0BF1, 0x0000, 0x0000},
349 {0x0BF2, 0x0000, 0x0000},
350 {0x00A0, 0x0000, 0x0000},
351 {0x0BBE, 0x0000, 0x0000},
352 {0x0BBF, 0x0000, 0x0000},
353 {0x0BC0, 0x0000, 0x0000},
354 {0x0BC1, 0x0000, 0x0000},
355 {0x0BC2, 0x0000, 0x0000},
356 {0x0BC6, 0x0000, 0x0000},
357 {0x0BC7, 0x0000, 0x0000},
358 {0x0BC8, 0x0000, 0x0000},
359 {0x00A9, 0x0000, 0x0000},
360 {0x0BCC, 0x0000, 0x0000},
361 {0x0B85, 0x0000, 0x0000},
362 {0x0B86, 0x0000, 0x0000},
363 {0x0B87, 0x0000, 0x0000},
364 {0x0B88, 0x0000, 0x0000},
365 {0x0B89, 0x0000, 0x0000},
366 {0x0B8A, 0x0000, 0x0000},
367 {0x0B8E, 0x0000, 0x0000},
368 {0x0B8F, 0x0000, 0x0000},
369 {0x0B90, 0x0000, 0x0000},
370 {0x0B92, 0x0000, 0x0000},
371 {0x0B93, 0x0000, 0x0000},
372 {0x0B94, 0x0000, 0x0000},
373 {0x0B83, 0x0000, 0x0000},
374 {0x0B95, 0x0000, 0x0000},
375 {0x0B99, 0x0000, 0x0000},
376 {0x0B9A, 0x0000, 0x0000},
377 {0x0B9E, 0x0000, 0x0000},
378 {0x0B9F, 0x0000, 0x0000},
379 {0x0BA3, 0x0000, 0x0000},
380 {0x0BA4, 0x0000, 0x0000},
381 {0x0BA8, 0x0000, 0x0000},
382 {0x0BAA, 0x0000, 0x0000},
383 {0x0BAE, 0x0000, 0x0000},
384 {0x0BAF, 0x0000, 0x0000},
385 {0x0BB0, 0x0000, 0x0000},
386 {0x0BB2, 0x0000, 0x0000},
387 {0x0BB5, 0x0000, 0x0000},
388 {0x0BB4, 0x0000, 0x0000},
389 {0x0BB3, 0x0000, 0x0000},
390 {0x0BB1, 0x0000, 0x0000},
391 {0x0BA9, 0x0000, 0x0000},
392 {0x0B9F, 0x0BBF, 0x0000},
393 {0x0B9F, 0x0BC0, 0x0000},
394 {0x0B95, 0x0BC1, 0x0000},
395 {0x0B9A, 0x0BC1, 0x0000},
396 {0x0B9F, 0x0BC1, 0x0000},
397 {0x0BA3, 0x0BC1, 0x0000},
398 {0x0BA4, 0x0BC1, 0x0000},
399 {0x0BA8, 0x0BC1, 0x0000},
400 {0x0BAA, 0x0BC1, 0x0000},
401 {0x0BAE, 0x0BC1, 0x0000},
402 {0x0BAF, 0x0BC1, 0x0000},
403 {0x0BB0, 0x0BC1, 0x0000},
404 {0x0BB2, 0x0BC1, 0x0000},
405 {0x0BB5, 0x0BC1, 0x0000},
406 {0x0BB4, 0x0BC1, 0x0000},
407 {0x0BB3, 0x0BC1, 0x0000},
408 {0x0BB1, 0x0BC1, 0x0000},
409 {0x0BA9, 0x0BC1, 0x0000},
410 {0x0B95, 0x0BC2, 0x0000},
411 {0x0B9A, 0x0BC2, 0x0000},
412 {0x0B9F, 0x0BC2, 0x0000},
413 {0x0BA3, 0x0BC2, 0x0000},
414 {0x0BA4, 0x0BC2, 0x0000},
415 {0x0BA8, 0x0BC2, 0x0000},
416 {0x0BAA, 0x0BC2, 0x0000},
417 {0x0BAE, 0x0BC2, 0x0000},
418 {0x0BAF, 0x0BC2, 0x0000},
419 {0x0BB0, 0x0BC2, 0x0000},
420 {0x0BB2, 0x0BC2, 0x0000},
421 {0x0BB5, 0x0BC2, 0x0000},
422 {0x0BB4, 0x0BC2, 0x0000},
423 {0x0BB3, 0x0BC2, 0x0000},
424 {0x0BB1, 0x0BC2, 0x0000},
425 {0x0BA9, 0x0BC2, 0x0000},
426 {0x0B95, 0x0B82, 0x0000},
427 {0x0B99, 0x0B82, 0x0000},
428 {0x0B9A, 0x0B82, 0x0000},
429 {0x0B9E, 0x0B82, 0x0000},
430 {0x0B9F, 0x0B82, 0x0000},
431 {0x0BA3, 0x0B82, 0x0000},
432 {0x0BA1, 0x0B82, 0x0000},
433 {0x0BA8, 0x0B82, 0x0000},
434 {0x0BAA, 0x0B82, 0x0000},
435 {0x0BAE, 0x0B82, 0x0000},
436 {0x0BAF, 0x0B82, 0x0000},
437 {0x0BB0, 0x0B82, 0x0000},
438 {0x0BB2, 0x0B82, 0x0000},
439 {0x0BB5, 0x0B82, 0x0000},
440 {0x0BB4, 0x0B82, 0x0000},
441 {0x0BB3, 0x0B82, 0x0000},
442 {0x0BB1, 0x0B82, 0x0000},
443 {0x0BA9, 0x0B82, 0x0000}
450 while (len-- && (diff = *s1++ - *s2++) == 0)
487 for (
int i = 0; i < 3; i++) {
490 if (s[i]) len = i + 1;
498 #endif // QT_NO_CODECS
#define QT_END_NAMESPACE
This macro expands to.
char * data()
Returns a pointer to the data stored in the byte array.
The QByteArray class provides an array of bytes.
static const ushort TsToUn[][3]
int mibEnum() const
Returns the MIB enum for the encoding.
long ASN1_INTEGER_get ASN1_INTEGER * a
The QString class provides a Unicode character string.
~QTsciiCodec()
Destroys the text codec object.
The QChar class provides a 16-bit Unicode character.
#define QT_BEGIN_NAMESPACE
This macro expands to.
static unsigned int qt_TSCIIToUnicode(unsigned int code, uint *s)
static const ushort UnToTs[][4]
static unsigned char qt_UnicodeToTSCII(ushort u1, ushort u2, ushort u3)
static int cmp(const ushort *s1, const ushort *s2, size_t len)
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const
Converts the first len characters in uc from Unicode to this encoding, and returns the result in a by...
const char * constData() const
Returns a pointer to the data stored in the byte array.
static const int UnToTsLast
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
Converts the first len characters in chars from this encoding to Unicode, and returns the result in a...
uchar row() const
Returns the row (most significant byte) of the Unicode character.
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
QByteArray name() const
Returns the official name for the encoding that is handled by the codec.