aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-07-29 21:04:31 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-07-29 21:04:31 +0000
commit6a9e16374f1549c7e63c7cd1c0e6989b2fb32191 (patch)
tree3c4f17322b237920d37281248bfb08d42cb5266c /IkiWiki.pm
parent48f9d393393709d8e998a9eb8d4095773ab185a1 (diff)
downloadikiwiki-6a9e16374f1549c7e63c7cd1c0e6989b2fb32191.tar
ikiwiki-6a9e16374f1549c7e63c7cd1c0e6989b2fb32191.tar.gz
* Locale patch from Faidon:
- Adds a locale setting to setup files. - Proper local time, if the locale configuration option is used. - Support for UTF-8 (or ISO-8859-X) filenames in SVN. Before this patch, commiting (or even rcs_updating) on repositories with UTF-8 filenames was impossible.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 2b877a370..085953a17 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -49,9 +49,21 @@ sub defaultconfig () { #{{{
adminemail => undef,
plugin => [qw{mdwn inline htmlscrubber}],
timeformat => '%c',
+ locale => undef,
} #}}}
sub checkconfig () { #{{{
+ # locale stuff; avoid LC_ALL since it overrides everything
+ if (defined $ENV{LC_ALL}) {
+ $ENV{LANG} = $ENV{LC_ALL};
+ delete $ENV{LC_ALL};
+ }
+ if (defined $config{locale}) {
+ eval q{use POSIX};
+ $ENV{LANG} = $config{locale}
+ if POSIX::setlocale(&POSIX::LANG, $config{locale});
+ }
+
if ($config{w3mmode}) {
eval q{use Cwd q{abs_path}};
$config{srcdir}=possibly_foolish_untaint(abs_path($config{srcdir}));