Advertisement
Guest User

vdr libsi patch for cyfra+ epg

a guest
May 7th, 2012
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.91 KB | None | 0 0
  1. --- libsi/si.org    2010-02-13 11:31:52.000000000 +0100
  2. +++ libsi/si.c    2010-11-27 12:32:41.000000000 +0100
  3. @@ -346,6 +346,14 @@
  4.     // "ETSI EN 300 468" the default character set is ISO6937. But unfortunately some
  5.     // broadcasters actually use ISO-8859-9, but fail to correctly announce that.
  6.     static const char *CharsetOverride = getenv("VDR_CHARSET_OVERRIDE");
  7. +
  8. +   // Fix for PL many channels using ISO6937 while specifying different encoding...
  9. +   if (strcspn((const char*)buffer,"\xC1\xC2\xC3\xC4\xC5\xC7\xC8\xCB\xCD\xCE\xCF\xE8\xF8") < strlen((const char*)buffer))
  10. +      return cs;
  11. +   // Below test for characters found in ISO-8859-2
  12. +   else if (strcspn((const char*)buffer,"\xA1\xA3\xA6\xAC\xAF\xB1\xB3\xB6\xBC\xBF\xC6\xCA\xD1\xD3\xE6\xEA\xF1\xF3") < strlen((const char*)buffer))
  13. +      return CharacterTables2[2];
  14. +
  15.     if (CharsetOverride)
  16.        cs = CharsetOverride;
  17.     if (isSingleByte)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement