summaryrefslogtreecommitdiff
path: root/libsi
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2007-06-10 13:02:43 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2007-06-10 13:02:43 +0200
commitc6f8a149574f4e5196f802439e7439406ca82e71 (patch)
tree0b04b012f87d7033abb37aeb986385672b85da18 /libsi
parent32dd727d057a1ba22d403f48306adae10285ac77 (diff)
downloadvdr-c6f8a149574f4e5196f802439e7439406ca82e71.tar.gz
vdr-c6f8a149574f4e5196f802439e7439406ca82e71.tar.bz2
Freetype font support; full UTF-8 support; dropped pixel fonts
Diffstat (limited to 'libsi')
-rw-r--r--libsi/si.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/libsi/si.c b/libsi/si.c
index aae9a2fb..2eb3dfd6 100644
--- a/libsi/si.c
+++ b/libsi/si.c
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: si.c 1.19 2007/05/28 10:22:42 kls Exp $
+ * $Id: si.c 1.20 2007/06/10 09:31:34 kls Exp $
* *
***************************************************************************/
@@ -219,7 +219,9 @@ char *String::getText() {
int len=getLength();
if (len < 0 || len > 4095)
return strdup("text error"); // caller will delete it!
- char *data=new char(len+1);
+ char *data=new char(len+1); // FIXME If this function is ever actually used, this buffer might
+ // need to be bigger in order to hold the string as UTF-8.
+ // Maybe decodeText should dynamically handle this? kls 2007-06-10
decodeText(data, len+1);
return data;
}
@@ -404,6 +406,9 @@ void String::decodeText(char *buffer, int size) {
}
bool singleByte;
const char *cs = getCharacterTable(from, len, &singleByte);
+ // FIXME Need to make this UTF-8 aware (different control codes).
+ // However, there's yet to be found a broadcaster that actually
+ // uses UTF-8 for the SI data... (kls 2007-06-10)
for (int i = 0; i < len; i++) {
if (*from == 0)
break;
@@ -440,6 +445,9 @@ void String::decodeText(char *buffer, char *shortVersion, int sizeBuffer, int si
}
bool singleByte;
const char *cs = getCharacterTable(from, len, &singleByte);
+ // FIXME Need to make this UTF-8 aware (different control codes).
+ // However, there's yet to be found a broadcaster that actually
+ // uses UTF-8 for the SI data... (kls 2007-06-10)
for (int i = 0; i < len; i++) {
if ( ((' ' <= *from) && (*from <= '~'))
|| (*from == '\n')