summaryrefslogtreecommitdiff
path: root/libsi/si.c
diff options
context:
space:
mode:
Diffstat (limited to 'libsi/si.c')
-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')