summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2008-03-05 17:16:31 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2008-03-05 17:16:31 +0100
commit620eb8150bd5cf1605c45bfbef018b716e50c544 (patch)
treed0fb332b5806bda4670db78e1180a9501c65f029
parent22805840fbb0aa90f1dfee9c78c3cf1de4886b47 (diff)
downloadvdr-620eb8150bd5cf1605c45bfbef018b716e50c544.tar.gz
vdr-620eb8150bd5cf1605c45bfbef018b716e50c544.tar.bz2
Revoked the fixed change of the default character set for SI data and introduced an environment variable to control it
-rw-r--r--CONTRIBUTORS4
-rw-r--r--HISTORY5
-rw-r--r--libsi/si.c8
3 files changed, 15 insertions, 2 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 384d7ffb..3d191dc5 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -2324,3 +2324,7 @@ Johan Schuring <johan.schuring@vetteblei.nl>
Sundararaj Reel <sundararaj.reel@googlemail.com>
for reporting a missing reset of maxNumber in cChannels::Renumber()
+
+Ales Jurik <ajurik@quick.cz>
+ for reporting broken SI data on Czech/Slovak channels after changing the default
+ character set to ISO-8859-9
diff --git a/HISTORY b/HISTORY
index 348163df..77d2c8f9 100644
--- a/HISTORY
+++ b/HISTORY
@@ -5698,3 +5698,8 @@ Video Disk Recorder Revision History
- Added a missing reset of maxNumber in cChannels::Renumber() (reported by Sundararaj
Reel).
+- Revoked the fixed change of the default character set for SI data and introduced
+ an environment variable to control it (thanks to Ales Jurik for reporting broken
+ SI data on the Czech/Slovak channels, which actually do follow the standard).
+ Users who want to set the default character set to something different can do wo
+ through "export VDR_CHARSET_OVERRIDE=ISO-8859-9".
diff --git a/libsi/si.c b/libsi/si.c
index 43ef0382..49464baf 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.24 2008/03/01 12:02:01 kls Exp $
+ * $Id: si.c 1.25 2008/03/05 17:00:55 kls Exp $
* *
***************************************************************************/
@@ -14,6 +14,7 @@
#include <errno.h>
#include <iconv.h>
#include <malloc.h>
+#include <stdlib.h> // for broadcaster stupidity workaround
#include <string.h>
#include "descriptor.h"
@@ -340,9 +341,12 @@ bool SetSystemCharacterTable(const char *CharacterTable) {
// and length are adjusted accordingly.
static const char *getCharacterTable(const unsigned char *&buffer, int &length, bool *isSingleByte = NULL) {
const char *cs = "ISO6937";
- cs = "ISO-8859-9"; // Workaround for broadcaster stupidity: according to
+ // Workaround for broadcaster stupidity: according to
// "ETSI EN 300 468" the default character set is ISO6937. But unfortunately some
// broadcasters actually use ISO-8859-9, but fail to correctly announce that.
+ static const char *CharsetOverride = getenv("VDR_CHARSET_OVERRIDE");
+ if (CharsetOverride)
+ cs = CharsetOverride;
if (isSingleByte)
*isSingleByte = false;
if (length <= 0)