Permalink
Browse files

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

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

0 comments on commit 2d7a73e

Please sign in to comment.