]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Revert "PR-108 - fix possible problems with some Polish channels char encoding."
authorAdam Sutton <dev@adamsutton.me.uk>
Fri, 21 Sep 2012 21:08:48 +0000 (22:08 +0100)
committerAdam Sutton <dev@adamsutton.me.uk>
Fri, 21 Sep 2012 21:08:48 +0000 (22:08 +0100)
Fixes #1240

This reverts commit e14391323fbe80f8df61e8416bc9d33e9a44a1be.

src/dvb/dvb_support.c

index f2d0470ed6f1db5af3f66fdc19f4258166f94c75..e1066c0c8ba65993969cd70d1b4b5824669b1045 100644 (file)
@@ -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;
   }