From df463b5a2a6814b12922dd7b2acad88263979c02 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 12 May 2007 09:35:07 +0200 Subject: Fixed getting the code setting from the locale --- CONTRIBUTORS | 1 + HISTORY | 3 ++- vdr.c | 6 ++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index a639d39c..8b5de13a 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -2051,6 +2051,7 @@ Tomas Berglund Matthias Schwarzott for suggesting to add LC_ALL to the checks for UTF-8 at startup + for fixing getting the code setting from the locale Martin Ostermann for fixing processing the PDCDescriptor in 'libsi' on big endian systems diff --git a/HISTORY b/HISTORY index 27a7769b..3ac9ba95 100644 --- a/HISTORY +++ b/HISTORY @@ -5180,7 +5180,7 @@ Video Disk Recorder Revision History - Official release. -2007-04-30: Version 1.5.3 +2007-05-12: Version 1.5.3 - Fixed some spelling errors in 'newplugin' (thanks to Ville Skyttä). - Fixed a busy loop in fast forward if the next video data file is missing @@ -5197,3 +5197,4 @@ Video Disk Recorder Revision History Parma and Helmut Auer). - Increased the maximum number of CA system ids to cope with the AlphaCrypt CAM's version 3.11 firmware. +- Fixed getting the code setting from the locale (thanks to Matthias Schwarzott). diff --git a/vdr.c b/vdr.c index a76809cd..5705bf31 100644 --- a/vdr.c +++ b/vdr.c @@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/vdr * - * $Id: vdr.c 1.289 2007/04/30 09:52:51 kls Exp $ + * $Id: vdr.c 1.290 2007/05/12 09:35:07 kls Exp $ */ #include @@ -493,7 +493,9 @@ int main(int argc, char *argv[]) // Set the system character table: - char *LangEnv = getenv("LANG"); + char *LangEnv = setlocale(LC_CTYPE, ""); + if (!LangEnv) + LangEnv = getenv("LANG"); // last resort in case locale stuff isn't installed if (LangEnv) { char *CodeSet = strchr(LangEnv, '.'); if (CodeSet) { -- cgit v1.2.3