From 81be9a275db0dd152138df02619a4105d5d53438 Mon Sep 17 00:00:00 2001 From: Adam Sutton Date: Fri, 21 Sep 2012 22:08:48 +0100 Subject: [PATCH] Revert "PR-108 - fix possible problems with some Polish channels char encoding." Fixes #1240 This reverts commit e14391323fbe80f8df61e8416bc9d33e9a44a1be. --- src/dvb/dvb_support.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/dvb/dvb_support.c b/src/dvb/dvb_support.c index f2d0470e..e1066c0c 100644 --- a/src/dvb/dvb_support.c +++ b/src/dvb/dvb_support.c @@ -41,11 +41,6 @@ static int convert_iso_8859[16] = { #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) { @@ -230,11 +225,7 @@ dvb_get_string(char *dst, size_t dstlen, const uint8_t *src, size_t srclen, char 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; @@ -266,11 +257,7 @@ dvb_get_string(char *dst, size_t dstlen, const uint8_t *src, size_t srclen, char 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; }