default charset utf-8 because the upload script is mostly used by us and we use mostly utf-8 if applicable at all once
authorMatthias Förste <foerste@schlittermann.de>
Tue, 07 Oct 2014 11:22:43 +0200
branchonce
changeset 34 4f5b1795bc92
parent 33 54f575c3d0c5
child 35 1800d3b7d5a6
default charset utf-8 because the upload script is mostly used by us and we use mostly utf-8 if applicable at all
upload.pl
--- a/upload.pl	Tue Oct 07 10:58:52 2014 +0200
+++ b/upload.pl	Tue Oct 07 11:22:43 2014 +0200
@@ -65,7 +65,7 @@
         $absolute =~ m|^\Q$base/$DIR\E| or die "invalid path: [$absolute]";
 
         open F, '<', $absolute or die "Can't open '<', '$absolute': $!";
-        print header(-type => mimetype($absolute));
+        print header(-type => mimetype($absolute), -charset => 'UTF-8');
         if (request_method() ~~ [qw(GET POST)]) {
             my ($buf, $res);
             print $buf while $res = read F, $buf, 32 * 2**10;