-# Fallback encoding when in dvb-text no encoding table is given. In normal
-# case this then is Latin1/ISO6397 with enabled two char byte mapping.
-# But here we override this for all EIT entries with given country code
-
-#Countycode ISO8859-X
-deu ISO8859-9 # i.e. needed for SKY Germany... they dont send a encoding in most dvb-texts ;(
-pol ISO8859-2 # this is needed by all known polish providers
-tur ISO8859-9 # is this realy needed .. please recheck and report
-gre ISO8859-7 # is this realy needed .. please recheck and report
-rus ISO8859-5 # is this realy needed .. please recheck and report
-bul ISO8859-5 # is this realy needed .. please recheck and report
-
-# Table of transponder using two byte char mappings
-# in normal case two char byte mapping is only used when in dvb-text no
-# encoding is given... but some providers use two-char byte mapping in
-# combination with other ISO8859-X tables.. so here it can be enabled
-# for some TSID/ONID combinations
-# a special case is when in dvb-text ISO8859-5 is selected... then
-# we also change the char table to ISO6397 this is used by
-# Cyfra+ and Cyfrowy Polsat and other polish providers
-# please report when you have an idea how to auto detect this!
-
+#Fallback encoding when in dvb-text no encoding table is given
+#Countycode ISO8859-X or ISO6397
+tur ISO8859-9
+gre ISO8859-7
+pol ISO8859-2
+rus ISO8859-5
+bul ISO8859-5
+#Sorry for that.. in DVB Spec this is the default behavior
+#when no other encoding is given in dvb-texts..
+#but this breaks too much providers yet..
+#so our default is ISO8859-1 without two char byte encoding
+#So all transponders which needs this must be listed here
#TSID ONID
+0x447 0x1 #ASTRA 19.2° UPC Direct
+0x427 0x1
+0x44b 0x1
+0x4ff 0x1
+0x407 0x1
+0x436 0x1 #ASTRA 19.2° MTV Euro - MTV Networks
+0x42a 0x1 #ASTRA 19.2° VH1 Classic - MTV Networks
+0xbc6 0x3 #ASTRA 23.5° Cslink, Skylink
+0xc85 0x3
+0xc89 0x3
+0xc8f 0x3
+0xbc7 0x3
400 318 #Hotbird 13.0° Cyfra+
1500 318
11000 318
1000 318 #Grupa ITI
1600 318 #Filmbox Polska and other
12200 318 #Disney Channel Polska and other
-12800 318 #Viacom ... MTV / VH1 Polska
13000 318 #BBC Polska and other
-
-# Fallback encoding when in dvb-text no encoding table is given. In normal
-# case this then is Latin1/ISO6397 with enabled two char byte mapping.
-# But here we override this for all EIT entries on transponders with given
-# TSID/ONID combination
-
+#Fallback encoding table for single transponders
+#ISO6397 also enables two byte char encoding
#TSID ONID ISO8859-X
+12800 318 ISO6397 #Viacom ... MTV / VH1 Polska
21100 126 ISO8859-9 # Digital Platform 7°E 10.928 H 30.000 2/3 8PSK
41200 126 ISO8859-9 # Digital Platform 7°E 11.451 V 25.066 2/3
50100 126 ISO8859-9 # Digital Platform 7°E 11.471 H 30.000 3/4
return d;
switch (cp)
{
- case 0: // Latin1/ISO6397 <-> unicode mapping
+ case 0: // ISO6397
return iso6397[d-0xA0];
case 1: // 8859-1 <-> unicode mapping
return d;
int i=0, t=0;
- // table given two this function is default 0... but when a default table for a country code is set in encoding.conf
- // then here this table is given
-
- // when a tsid/onid is avail the table can be overriden in encoding.conf based on tsid/onid combinations
if ( tsidonid )
encodingHandler.getTransponderDefaultMapping(tsidonid, table);
}
case 0x11: // Basic Multilingual Plane of ISO/IEC 10646-1 enc (UTF-16... Unicode)
table = 65;
-// eDebug("(0x11)text encoded in ISO-10646-1 (UTF-16)");
+ tsidonid = 0;
++i;
break;
case 0x12:
eDebug("reserved %d", data[0]);
++i;
break;
- default:
-// eDebug("no encoding in dvb string given.. use default table %d", table);
- break;
}
- bool useTwoCharMapping = (!table) || (tsidonid && encodingHandler.getTransponderUseTwoCharMapping(tsidonid));
- // two char byte mapping is default enabled for table 0 (ISO6397) (described in ETSI EN300468)
- // or it can be enabled for tsid/onid combinations in our encoding.conf
+ bool useTwoCharMapping = !table || tsidonid && encodingHandler.getTransponderUseTwoCharMapping(tsidonid);
if (useTwoCharMapping && table == 5) { // i hope this dont break other transponders which realy use ISO8859-5 and two char byte mapping...
// eDebug("Cyfra / Cyfrowy Polsat HACK... override given ISO8859-5 with ISO6397");
table = 0;
}
-// eDebug("tsid %04x, onid %04x, used table is now %d, twoChar %d", tsidonid >> 16, tsidonid & 0xFFFF, table, useTwoCharMapping);
-
unsigned char res[2048];
while (i < len)
{
std::string getNum(int num, int base=10);
-std::string convertDVBUTF8(const unsigned char *data, int len, int table=0, int tsidonid=0); // with default ISO8859-1/Latin1
+std::string convertDVBUTF8(const unsigned char *data, int len, int table=1, int tsidonid=0); // with default ISO8859-1 / Latin1
std::string convertLatin1UTF8(const std::string &string);
int isUTF8(const std::string &string);
void makeUpper(std::string &s);
std::string replace_all(const std::string &in, const std::string &entity, const std::string &symbol);
-inline std::string convertDVBUTF8(const std::string &string, int table=0, int tsidonid=0) // with default ISO8859-1/Latin1
+inline std::string convertDVBUTF8(const std::string &string, int table=1, int tsidonid=0) // with default ISO8859-1 / Latin1
{
return convertDVBUTF8((const unsigned char*)string.c_str(), string.length(), table, tsidonid);
}