Advertisement
Guest User

Untitled

a guest
May 25th, 2015
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. --- libsi/si.c 2015-05-25 08:44:24.132429634 +0200
  2. +++ libsi/si.c 2015-05-25 08:42:58.726199616 +0200
  3. @@ -351,11 +351,20 @@
  4. return false;
  5. }
  6.  
  7. +/************ Modded for fix polish EPG character *********************************/
  8. const char *getCharacterTable(const unsigned char *&buffer, int &length, bool *isSingleByte) {
  9. const char *cs = "ISO6937";
  10. // Workaround for broadcaster stupidity: according to
  11. // "ETSI EN 300 468" the default character set is ISO6937. But unfortunately some
  12. // broadcasters actually use ISO-8859-9, but fail to correctly announce that.
  13. +
  14. +// Fix for PL many channels using ISO6937 while specifying different encoding...
  15. + if (strcspn((const char*)buffer,"\xC1\xC2\xC3\xC4\xC5\xC7\xC8\xCB\xCD\xCE\xCF\xE8\xF8") < strlen((const char*)buffer))
  16. + return cs;
  17. + // Below test for characters found in ISO-8859-2
  18. + 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))
  19. + return CharacterTables2[2];
  20. +
  21. if (OverrideCharacterTable)
  22. cs = OverrideCharacterTable;
  23. if (isSingleByte)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement