#define convert_utf8 14
#define convert_iso6937 15
-#define PL_FIX_CHARS \
-"\xA1\xA3\xA6\xAC\xAF\xB1\xB3\xB6\xBC\xBF"\
-"\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xCA\xCB\xCD\xCE\xCF"\
-"\xD1\xD3\xE6\xE8\xEA\xF1\xF3\xF8"
-
static inline int encode_utf8(unsigned int c, char *outb, int outleft)
{
if (c <= 0x7F && outleft >= 1) {
return -1;
case 0x01 ... 0x0b:
- // NOTE: some Polish channels using ISO6937 while specifying ISO8859-4
- if ((src[0] + 4) == 5 && strpbrk((const char*)src, PL_FIX_CHARS))
- ic = convert_iso6937;
- else
- ic = convert_iso_8859[src[0] + 4];
+ ic = convert_iso_8859[src[0] + 4];
src++; srclen--;
break;
ic = convert_iso6937;
}
} else {
- // Note: some Polish channels using ISO8859-2 while specifying no encoding
- if (strpbrk((const char*)src, PL_FIX_CHARS))
- ic = convert_iso_8859[2];
- else
- ic = convert_iso6937;
+ ic = convert_iso6937;
}
break;
}