Permalink
Browse files

Refs #9672 - Adds support for multi-byte EIT encodings.

Thanks to moitinho for the original patch.
  • Loading branch information...
stuarta committed May 5, 2011
1 parent a0bb5e9 commit e751ba6c5edf1f6e11b9f830441892aa16d5ac69
Showing with 6 additions and 5 deletions.
  1. +0 −3 mythtv/libs/libmythtv/eithelper.cpp
  2. +6 −2 mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp
@@ -972,9 +972,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)
@@ -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: "
@@ -138,6 +138,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
@@ -156,7 +160,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: "

0 comments on commit e751ba6

Please sign in to comment.