projects
/
grml-shlib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
bcc521c
)
added LANG/LC_ALL management functions
author
Michael Gebetsroither
<michael.geb@gmx.at>
Mon, 7 Nov 2005 21:22:34 +0000
(22:22 +0100)
committer
Michael Gebetsroither
<michael.geb@gmx.at>
Mon, 7 Nov 2005 21:22:34 +0000
(22:22 +0100)
sh-lib
patch
|
blob
|
history
diff --git
a/sh-lib
b/sh-lib
index
640a5b6
..
437d60c
100644
(file)
--- 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"; }
# }}}