summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2007-05-12 09:35:07 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2007-05-12 09:35:07 +0200
commitdf463b5a2a6814b12922dd7b2acad88263979c02 (patch)
tree6e5168eac32d6d9eec9903a7388595d91ee67d9c /vdr.c
parentd472e8b63bdc4e3674e25c8e6dff3902c9255f8f (diff)
downloadvdr-df463b5a2a6814b12922dd7b2acad88263979c02.tar.gz
vdr-df463b5a2a6814b12922dd7b2acad88263979c02.tar.bz2
Fixed getting the code setting from the locale
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c6
1 files changed, 4 insertions, 2 deletions
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 <getopt.h>
@@ -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) {