From: Andreas Monzner Date: Thu, 2 Nov 2006 21:35:40 +0000 (+0000) Subject: fix national option subset selection, X-Git-Tag: 2.6.0~2770 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/4dfa43611e65709b6cdb570868055bd19382cf6a fix national option subset selection, fix national option subset char offset --- diff --git a/lib/dvb/teletext.cpp b/lib/dvb/teletext.cpp index fe31c178..4fa0a8a6 100644 --- a/lib/dvb/teletext.cpp +++ b/lib/dvb/teletext.cpp @@ -376,17 +376,23 @@ void eDVBTeletextParser::addSubtitleString(int color, std::string string) idx = 0, outidx = 0, Gtriplet = 0, - nat_opts = (m_C >> 11) & 0x7, + nat_opts = (m_C & (1<<14) ? 1 : 0) | (m_C & (1<<13) ? 2 : 0) | (m_C & (1<<12) ? 4 : 0), nat_subset = NationalOptionSubsetsLookup[Gtriplet*8+nat_opts]; +// eDebug("nat_opts = %d, nat_subset = %d, m_C %08x, C121314 = %d%d%d", +// nat_opts, nat_subset, m_C, +// (m_C & (1<<12))?1:0, +// (m_C & (1<<13))?1:0, +// (m_C & (1<<14))?1:0); while (idx < len) { unsigned char c = string[idx]; if (c >= 0x20) { - if (NationalReplaceMap[c]) + unsigned char offs = NationalReplaceMap[c]; + if (offs) { unsigned int utf8_code = - NationalOptionSubsets[nat_subset*14+c]; + NationalOptionSubsets[nat_subset*14+offs]; if (utf8_code > 0xFFFFFF) out[outidx++]=(utf8_code&0xFF000000)>>24; if (utf8_code > 0xFFFF)