summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStuart Auchterlonie <stuarta@squashedfrog.net>2011-05-05 14:21:12 (GMT)
committer Stuart Auchterlonie <stuarta@squashedfrog.net>2011-05-05 18:41:24 (GMT)
commit2d7a73e67bec28c81b37ff01249a10d34881414c (patch)
tree8c5c8f7ff9316899e449f049bca8e40a00ae46d3
parent8596c4efd77a629483d6d60106495cdc5e4ff509 (diff)
Refs #9672 - Adds support for multi-byte EIT encodings.
Thanks to moitinho for the original patch.
-rw-r--r--mythtv/libs/libmythtv/eithelper.cpp3
-rw-r--r--mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp8
2 files changed, 6 insertions, 5 deletions
diff --git a/mythtv/libs/libmythtv/eithelper.cpp b/mythtv/libs/libmythtv/eithelper.cpp
index 0352721..7a431f5 100644
--- a/mythtv/libs/libmythtv/eithelper.cpp
+++ b/mythtv/libs/libmythtv/eithelper.cpp
@@ -982,9 +982,6 @@ static void init_fixup(QMap<uint64_t,uint> &fix)
fix[ 1094LL << 32 | 1 << 16 | 17028 ] = // NT1
fix[ 1100LL << 32 | 1 << 16 | 8710 ] = // NRJ 12
EITFixUp::kEFixForceISO8859_15;
-
- // DVB-T TDT, Portugal (RTP 1, RTP 2, SIC, TVI)
- fix[ 1101LL << 32 | 8904U << 16 ] = EITFixUp::kEFixForceISO8859_15;
}
static int calc_eit_utc_offset(void)
diff --git a/mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp b/mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp
index 30d6f7a..066aa96 100644
--- a/mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp
+++ b/mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp
@@ -78,7 +78,7 @@ QString dvb_decode_text(const unsigned char *src, uint raw_length,
if (src[0] == 0x1f)
return freesat_huffman_to_string(src, raw_length);
- if ((0x10 < src[0]) && (src[0] < 0x20))
+ if (((0x10 < src[0]) && (src[0] < 0x15)) || ((0x15 < src[0]) && (src[0] < 0x20)))
{
// TODO: Handle multi-byte encodings
VERBOSE(VB_SIPARSER, "dvb_decode_text: "
@@ -140,6 +140,10 @@ static QString decode_text(const unsigned char *buf, uint length)
else
return QString::fromLocal8Bit((char*)(buf + 3), length - 3);
}
+ else if (buf[0] == 0x15) // Already Unicode
+ {
+ return QString::fromUtf8((char*)(buf + 1), length - 1);
+ }
else
{
// Unknown/invalid encoding - assume local8Bit
@@ -158,7 +162,7 @@ QString dvb_decode_short_name(const unsigned char *src, uint raw_length)
return "";
}
- if ((0x10 < src[0]) && (src[0] < 0x20))
+ if (((0x10 < src[0]) && (src[0] < 0x15)) || ((0x15 < src[0]) && (src[0] < 0x20)))
{
// TODO: Handle multi-byte encodings
VERBOSE(VB_SIPARSER, "dvb_decode_short_name: "