… | … | ||
---|---|---|---|
13 | 13 | ||
14 | my $tmpfile = "/tmp/$filename"; | 14 | my $tmpfile = "/tmp/$filename"; |
15 | 15 | ||
16 | my $msg = "uploaded as $filename"; | 16 | my $msg = "uploaded as $filename"; |
17 | 17 | ||
18 | if (open my $o, ">", $tmpfile) { | 18 | if (open my $o, ">:utf-8", $tmpfile) { |
19 | chmod 0644, $tmpfile; | 19 | chmod 0644, $tmpfile; |
20 | print $o $txt; | 20 | print $o $txt; |
21 | close $o; | 21 | close $o; |
22 | } else { | 22 | } else { |
23 | $msg = "couldn't write $tmpfile: $!"; | 23 | $msg = "couldn't write $tmpfile: $!"; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |