X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/63cbca66735250be3fb0c616cc84c46a3495a3f0..6c44a351d95cf1bcfa2a9f614382b818f581b1f6:/SL/Dispatcher.pm diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index 357f9f8fd..abc5ec82f 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -7,15 +7,6 @@ use strict; # parse_html_template('login_screen/user_login') # parse_html_template('generic/error') -BEGIN { - use SL::System::Process; - my $exe_dir = SL::System::Process::exe_dir; - - unshift @INC, "${exe_dir}/modules/override"; # Use our own versions of various modules (e.g. YAML). - push @INC, "${exe_dir}/modules/fallback"; # Only use our own versions of modules if there's no system version. - unshift @INC, $exe_dir; -} - use Carp; use CGI qw( -no_xhtml); use Config::Std; @@ -27,6 +18,7 @@ use File::Basename; use IO::File; use List::MoreUtils qw(all); use List::Util qw(first); +use POSIX qw(setlocale); use SL::ArchiveZipFixes; use SL::Auth; use SL::Dispatcher::AuthHandler; @@ -60,6 +52,11 @@ sub new { SL::ArchiveZipFixes->apply_fixes; + # Initialize character type locale to be UTF-8 instead of C: + foreach my $locale (qw(de_DE.UTF-8 en_US.UTF-8)) { + last if setlocale('LC_CTYPE', $locale); + } + return $self; } @@ -353,7 +350,7 @@ sub handle_request { $::locale = undef; $::form = undef; - $::myconfig = (); + %::myconfig = (); $::request = undef; SL::DBConnect::Cache->reset_all;