]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Dispatcher.pm
Module: Update von PDF::Table auf 0.10.1
[mfinanz.git] / SL / Dispatcher.pm
index fbe63f2ecb1e2fbab7e03a663b6e94547900409d..abc5ec82fac36d55093bc612d8f895255bf1182b 100644 (file)
@@ -18,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;
@@ -51,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;
 }
 
@@ -344,7 +350,7 @@ sub handle_request {
 
   $::locale   = undef;
   $::form     = undef;
-  $::myconfig = ();
+  %::myconfig = ();
   $::request  = undef;
 
   SL::DBConnect::Cache->reset_all;