Beim URL-Unescapen von UTF-8 ins internen Encoding wandeln, sofern benötigt
[kivitendo-erp.git] / SL / Form.pm
index f0ad1a1..6b1ee50 100644 (file)
@@ -394,6 +394,7 @@ sub unescape {
   $str =~ s/\\$//;
 
   $str =~ s/%([0-9a-fA-Z]{2})/pack("c",hex($1))/eg;
+  $str =  Encode::decode('utf-8-strict', $str) if $::locale->is_utf8;
 
   $main::lxdebug->leave_sub(2);
 
@@ -679,7 +680,6 @@ EOT
   print <<EOT;
   <link rel="stylesheet" href="css/jquery.autocomplete.css" type="text/css" />
   <meta name="robots" content="noindex,nofollow" />
-  <script type="text/javascript" src="js/highlight_input.js"></script>
   <link rel="stylesheet" type="text/css" href="css/tabcontent.css" />
   <script type="text/javascript" src="js/tabcontent.js">
 
@@ -1324,6 +1324,7 @@ sub parse_template {
       my $numbytes = (-s $self->{tmpfile});
       open(IN, $self->{tmpfile})
         or $self->error($self->cleanup . "$self->{tmpfile} : $!");
+      binmode IN;
 
       $self->{copies} = 1 unless $self->{media} eq 'printer';