Ticket #11701: 0012-force-EIT-encoding-to-ISO-8859-2-for-T-K-bel.patch

File 0012-force-EIT-encoding-to-ISO-8859-2-for-T-K-bel.patch, 2.6 KB (added by Karl Egly, 7 years ago)
  • mythtv/libs/libmythtv/eitfixup.h

    From 9f2e5303263a07bb9cfd45f9b75f1eac957f0a50 Mon Sep 17 00:00:00 2001
    From: Karl Dietz <dekarl@mythtv.org>
    Date: Fri, 18 Jan 2013 21:49:33 +0100
    Subject: [PATCH 12/18] =?UTF-8?q?force=20EIT=20encoding=20to=20ISO-8859-2=20?=
     =?UTF-8?q?for=20T-K=C3=A1bel?=
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    
    ---
     mythtv/libs/libmythtv/eitfixup.h    |    1 +
     mythtv/libs/libmythtv/eithelper.cpp |   15 +++++++++++++++
     2 files changed, 16 insertions(+)
    
    diff --git a/mythtv/libs/libmythtv/eitfixup.h b/mythtv/libs/libmythtv/eitfixup.h
    index 3dd2b45..6182a1d 100644
    a b class EITFixUp 
    6262        kEFixForceISO8859_1  = 0x2000,
    6363        kEFixForceISO8859_15 = 0x4000,
    6464        kEFixForceISO8859_9  = 0x80000,
     65        kEFixForceISO8859_2  = 0x100000,
    6566    };
    6667
    6768    EITFixUp();
  • mythtv/libs/libmythtv/eithelper.cpp

    diff --git a/mythtv/libs/libmythtv/eithelper.cpp b/mythtv/libs/libmythtv/eithelper.cpp
    index 96a6443..e7b2cc4 100644
    a b static void parse_dvb_event_descriptors(desc_list_t list, uint fix, 
    224224
    225225    // from EN 300 468, Appendix A.2 - Selection of character table
    226226    unsigned char enc_1[3]  = { 0x10, 0x00, 0x01 };
     227    unsigned char enc_2[3]  = { 0x10, 0x00, 0x02 };
    227228    unsigned char enc_9[3]  = { 0x10, 0x00, 0x09 }; // could use { 0x05 } instead
    228229    unsigned char enc_15[3] = { 0x10, 0x00, 0x0f }; // could use { 0x0B } instead
    229230    int enc_len = 0;
    static void parse_dvb_event_descriptors(desc_list_t list, uint fix, 
    237238        enc_len = sizeof(enc_1);
    238239    }
    239240
     241    // Is this broken DVB provider in Central Europe?
     242    // Use an encoding override of ISO 8859-2 (Latin2)
     243    if (fix & EITFixUp::kEFixForceISO8859_2)
     244    {
     245        enc = enc_2;
     246        enc_len = sizeof(enc_2);
     247    }
     248
    240249    // Is this broken DVB provider in Western Europe?
    241250    // Use an encoding override of ISO 8859-9 (Latin5)
    242251    if (fix & EITFixUp::kEFixForceISO8859_9)
    static void init_fixup(QMap<uint64_t,uint> &fix) 
    12101219        fix[ 1094LL << 32 | 1 << 16 | 17028 ] = // NT1
    12111220        fix[ 1100LL << 32 | 1 << 16 |  8710 ] = // NRJ 12
    12121221        EITFixUp::kEFixForceISO8859_15;
     1222
     1223    // DVB-C T-Kábel Hungary
     1224    // FIXME this should be more specific. Is the encoding really wrong for all services?
     1225    fix[  100 << 16] = // T-Kábel
     1226    fix[  101 << 16] = // belongs to France Telecom Orange but is not an assigned network_id
     1227        EITFixUp::kEFixForceISO8859_2;
    12131228}
    12141229
    12151230/** \fn EITHelper::RescheduleRecordings(void)