git.cweiske.de
/
enigma2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
baf763c
)
estring.cpp: add support for ISO/IEC 10646-1 (Basic Multilingual Plane) (aka UTF...
author
ghost
<andreas.monzner@multimedia-labs.de>
Mon, 8 Jun 2009 22:01:37 +0000
(
00:01
+0200)
committer
ghost
<andreas.monzner@multimedia-labs.de>
Mon, 8 Jun 2009 22:01:37 +0000
(
00:01
+0200)
lib/base/estring.cpp
patch
|
blob
|
history
diff --git
a/lib/base/estring.cpp
b/lib/base/estring.cpp
index 85bbcc6986f4140c5b7db1f31514b38b17cfac8f..be071454923ff6be1bc1f32fc61dbc96fbd6fa28 100644
(file)
--- 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;
}
}
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:
++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;
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
if (!code)
continue;
// Unicode->UTF8 encoding