diff options
author | 2008-04-19 12:55:53 +0000 | |
---|---|---|
committer | 2008-04-19 12:55:53 +0000 | |
commit | 595eecead9ed1f4c248a1577dc542988a61bfd4c (patch) | |
tree | 48d08dc92946ef7ca46ed8117849d03f02b5edcf /usr/share/vdr/rcscript | |
parent | Print name of log-file in every case when errors are detected. (diff) | |
download | gentoo-vdr-scripts-595eecead9ed1f4c248a1577dc542988a61bfd4c.tar.gz gentoo-vdr-scripts-595eecead9ed1f4c248a1577dc542988a61bfd4c.tar.bz2 gentoo-vdr-scripts-595eecead9ed1f4c248a1577dc542988a61bfd4c.zip |
Make charmap handling more verbose and fix some export/usage order. Bug #217906
svn path=/gentoo-vdr-scripts/trunk/; revision=589
Diffstat (limited to 'usr/share/vdr/rcscript')
-rw-r--r-- | usr/share/vdr/rcscript/pre-start-45-utf8-check.sh | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/usr/share/vdr/rcscript/pre-start-45-utf8-check.sh b/usr/share/vdr/rcscript/pre-start-45-utf8-check.sh index 5c19049..4fcccec 100644 --- a/usr/share/vdr/rcscript/pre-start-45-utf8-check.sh +++ b/usr/share/vdr/rcscript/pre-start-45-utf8-check.sh @@ -20,22 +20,27 @@ unset_all_locale_settings() { addon_main() { if [ -n "${CAP_UTF8}" ]; then # vdr supports utf8 :) - local charmap=$(locale charmap) - local l - # export LANG if it is set + # export LANG if it is set (before calling locale, Bug #217906) [ -n "${LANG}" ] && export LANG + local charmap=$(locale charmap) + if [ "${charmap}" = "ANSI_X3.4-1968" ]; then # User has not set any locale stuff - ewarn "You have not set a charmap! (LANG in /etc/env.d/02locale or /etc/conf.d/vdr)" - + ewarn "Your local charmap is ANSI_X3.4-1968." + if [ -n "${LANG}" ]; then + ewarn "It seems the locale you chose does not exist on your system [LANG=${LANG}]" + ewarn "Please have a look at /etc/locale.gen" + else + ewarn "You have not set a charmap! (LANG in /etc/env.d/02locale or /etc/conf.d/vdr)" + fi # Lets guess - # try an english utf8 locale - l="$(locale -a|grep utf8|grep ^en|head -n 1)" + # try an english utf8 locale first + local l="$(locale -a|grep utf8|grep ^en|head -n 1)" if [ "${l}" = "" ]; then # none found @@ -46,6 +51,8 @@ addon_main() { if [ "${l}" != "" ]; then export LANG="${l}" ewarn "Automatically using locale ${l} to get most of vdr utf8 support." + else + ewarn "Not found any utf8 locale, you will have problems with chars extending ASCII" fi fi |