From: Michael Gebetsroither Date: Mon, 7 Nov 2005 21:22:34 +0000 (+0100) Subject: added LANG/LC_ALL management functions X-Git-Tag: 1.02.04~2 X-Git-Url: http://git.grml.org/?p=grml-shlib.git;a=commitdiff_plain;h=9ac245952aee3971004e3f6bf8f0746efdc43506 added LANG/LC_ALL management functions --- diff --git a/sh-lib b/sh-lib index 640a5b6..437d60c 100644 --- a/sh-lib +++ b/sh-lib @@ -25,6 +25,9 @@ SYSLOG__="YES" CMD_LINE__="" # /proc/cmdline +LANG__="$LANG" +LC_ALL__="$LC_ALL" + # CONFIG FUNCTIONS {{{ @@ -34,6 +37,10 @@ function setExitFunction { EXIT_FUNCTION__="$1"; } function disableSyslog { SYSLOG__="NO"; } function enableSyslog { SYSLOG__="YES"; } + +function saveLang { LANG__="$LANG"; LC_ALL__="$LC_ALL"; } +function restoreLang { LANG="$LANG__"; LC_ALL="$LC_ALL__"; } +function setCLang { saveLang; LANG="C"; LC_ALL="C"; } # }}}