forked from github/kensanata.oddmuse
Add another test regarding UTF-8 pagenames.
Use binmode(":pop:raw") because this appears to be necessary for
Windows users -- Ingo Belka was using ActivePerl versions 5.10.1 and
5.14.2 to test it.
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
require 't/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 40;
|
||||
use Test::More tests => 41;
|
||||
use utf8; # tests contain UTF-8 characters and it matters
|
||||
|
||||
clear_pages();
|
||||
@@ -110,3 +110,7 @@ test_page(get_page("action=browse id=All cache=0"), "Русский");
|
||||
# testing search
|
||||
test_page(get_page('search=Русский raw=1'),
|
||||
qw(Russian));
|
||||
|
||||
# testing page editing
|
||||
test_page(update_page("Русский", "друзья"),
|
||||
"друзья");
|
||||
|
||||
2
wiki.pl
2
wiki.pl
@@ -3131,7 +3131,7 @@ sub DoDownload {
|
||||
if @UploadTypes and not $allowed{$type};
|
||||
print GetHttpHeader($type, $ts, undef, $encoding);
|
||||
require MIME::Base64;
|
||||
binmode(STDOUT, "raw");
|
||||
binmode(STDOUT, ":pop:raw"); # need to pop utf8 for Windows users!?
|
||||
print MIME::Base64::decode($data);
|
||||
} else {
|
||||
print GetHttpHeader('text/plain', $ts);
|
||||
|
||||
Reference in New Issue
Block a user