aboutsummaryrefslogtreecommitdiff
path: root/lib/base
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2009-06-09 00:01:37 +0200
committerghost <andreas.monzner@multimedia-labs.de>2009-06-09 00:01:37 +0200
commitddd3b54bd32d9bbf0768856093fcf2329525832e (patch)
tree74b2d008b415b4462914222e7830b73efb038623 /lib/base
parentbaf763c28e69b34a698d6d3dec3781eddbdd72c3 (diff)
downloadenigma2-ddd3b54bd32d9bbf0768856093fcf2329525832e.tar.gz
enigma2-ddd3b54bd32d9bbf0768856093fcf2329525832e.zip
estring.cpp: add support for ISO/IEC 10646-1 (Basic Multilingual Plane) (aka UTF-16 ... aka Unicode) dvb encoded strings
Diffstat (limited to 'lib/base')
-rw-r--r--lib/base/estring.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/base/estring.cpp b/lib/base/estring.cpp
index 85bbcc69..be071454 100644
--- a/lib/base/estring.cpp
+++ b/lib/base/estring.cpp
@@ -398,8 +398,9 @@ std::string convertDVBUTF8(const unsigned char *data, int len, int table, int ts
}
break;
}
- case 0x11:
- eDebug("unsup. Basic Multilingual Plane of ISO/IEC 10646-1 enc.");
+ case 0x11: // Basic Multilingual Plane of ISO/IEC 10646-1 enc (UTF-16... Unicode)
+ table = 65;
+ tsidonid = 0;
++i;
break;
case 0x12:
@@ -438,8 +439,16 @@ std::string convertDVBUTF8(const unsigned char *data, int len, int table, int ts
unsigned long code=0;
if ( useTwoCharMapping && i+1 < len && (code=doVideoTexSuppl(data[i], data[i+1])) )
i+=2;
- if (!code)
- code=recode(data[i++], table);
+ if (!code) {
+ if (table == 65) { // unicode
+ if (i+1 < len) {
+ code=(data[i] << 8) | data[i+1];
+ i += 2;
+ }
+ }
+ else
+ code=recode(data[i++], table);
+ }
if (!code)
continue;
// Unicode->UTF8 encoding