diff options
author | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2008-04-03 22:39:14 +0200 |
---|---|---|
committer | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2008-04-03 22:39:14 +0200 |
commit | 81419138d8d5ebfdc0494b3f29de88c2999a277d (patch) | |
tree | 49dfa35dbd826799e4e4f0a8636e4d224fab58bd /epgsearch.c | |
parent | 11db30edf64aa8fdcbadc9fd39082c9bd0b6d826 (diff) | |
download | vdr-plugin-epgsearch-81419138d8d5ebfdc0494b3f29de88c2999a277d.tar.gz vdr-plugin-epgsearch-81419138d8d5ebfdc0494b3f29de88c2999a277d.tar.bz2 |
support for VDRSymbols font, 0.9.24.beta26
spanish translation update
Diffstat (limited to 'epgsearch.c')
-rw-r--r-- | epgsearch.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/epgsearch.c b/epgsearch.c index f39593e..58c0e98 100644 --- a/epgsearch.c +++ b/epgsearch.c @@ -66,13 +66,14 @@ The project's page is at http://winni.vdr-developer.org/epgsearch #include "menu_announcelist.h" #include "confdloader.h" -static const char VERSION[] = "0.9.24.beta25"; +static const char VERSION[] = "0.9.24.beta26"; static const char DESCRIPTION[] = trNOOP("search the EPG for repeats and more"); // globals char *ConfigDir = NULL; bool reloadMenuConf = false; int updateForced = 0; +bool isUTF8 = false; // LogFile declaration and statics cLogFile LogFile; @@ -456,9 +457,30 @@ bool cPluginEpgsearch::Start(void) cSwitchTimerThread::Init(); cConflictCheckThread::Init(this); + CheckUTF8(); + return true; } +void cPluginEpgsearch::CheckUTF8() +{ + // Taken from VDR's vdr.c + char *CodeSet = NULL; + if (setlocale(LC_CTYPE, "")) + CodeSet = nl_langinfo(CODESET); + else { + char *LangEnv = getenv("LANG"); // last resort in case locale stuff isn't installed + if (LangEnv) { + CodeSet = strchr(LangEnv, '.'); + if (CodeSet) + CodeSet++; // skip the dot + } + } + + if (CodeSet && strcasestr(CodeSet, "UTF-8") != 0) + isUTF8=true; +} + void cPluginEpgsearch::Stop(void) { cSearchTimerThread::Exit(); |