Ticket #9672: eit_utf8_patch-2.diff

File eit_utf8_patch-2.diff, 1.9 KB (added by anonymous, 15 years ago)

The second if was not correct

  • mythtv/libs/libmythtv/eithelper.cpp

    diff --git a/mythtv/libs/libmythtv/eithelper.cpp b/mythtv/libs/libmythtv/eithelper.cpp
    index b3a9974..9afe5df 100644
    a b static void init_fixup(QMap<uint64_t,uint> &fix)  
    972972        fix[ 1094LL << 32 | 1 << 16 | 17028 ] = // NT1
    973973        fix[ 1100LL << 32 | 1 << 16 |  8710 ] = // NRJ 12
    974974        EITFixUp::kEFixForceISO8859_15;
    975 
    976     // DVB-T TDT, Portugal (RTP 1, RTP 2, SIC, TVI)
    977     fix[ 1101LL << 32 | 8904U << 16 ] = EITFixUp::kEFixForceISO8859_15;
    978975}
    979976
    980977static int calc_eit_utc_offset(void)
  • mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp

    diff --git a/mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp b/mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp
    index bbe2e7f..cf004a1 100644
    a b QString dvb_decode_text(const unsigned char *src, uint raw_length,  
    7878    if (src[0] == 0x1f)
    7979        return freesat_huffman_to_string(src, raw_length);
    8080
    81     if ((0x10 < src[0]) && (src[0] < 0x20))
     81    if (((0x10 < src[0]) && (src[0] < 0x15)) || ((0x15 < src[0]) && (src[0] < 0x20)))
    8282    {
    8383        // TODO: Handle multi-byte encodings
    8484        VERBOSE(VB_SIPARSER, "dvb_decode_text: "
    static QString decode_text(const unsigned char *buf, uint length)  
    138138        else
    139139            return QString::fromLocal8Bit((char*)(buf + 3), length - 3);
    140140    }
     141    else if (buf[0] == 0x15) // Already Unicode
     142    {
     143        return QString::fromUtf8((char*)(buf + 1), length -1);
     144    }
    141145    else
    142146    {
    143147        // Unknown/invalid encoding - assume local8Bit
    QString dvb_decode_short_name(const unsigned char *src, uint raw_length)  
    156160        return "";
    157161    }
    158162
    159        if ((0x10 < src[0]) && (src[0] < 0x20))
     163    if (((0x10 < src[0]) && (src[0] < 0x15)) || ((0x15 < src[0]) && (src[0] < 0x20)))
    160164    {
    161165        // TODO: Handle multi-byte encodings
    162166        VERBOSE(VB_SIPARSER, "dvb_decode_short_name: "