in reply to Re^3: Proper Unicode handling in Perl
in thread Is there some universal Unicode+UTF8 switch?
Codepages seem to be the sticky wicket:
C:\Users\tblaz\Documents\evelyn>perl 1.hello.cyr.pl default encoding: Active code page: 437 ╨ƒ╤Ç╨╕╨▓╨╡╤é ------------ Active code page: 65001 Привет
#!/usr/bin/perl -w use 5.016; use utf8::all; #binmode STDOUT, ":utf8"; say "default encoding:"; system "chcp"; say "Привет"; say "------------"; system "chcp 65001"; say "Привет"; __END__
Once the right codepage is present, the test succeeeds:
C:\Users\tblaz\Documents\evelyn>perl 1.cyr.pl ... ------- Content-Type: text/html; charset=utf-8 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Мой тест</title> </head> <body> Бабкинъ Михаилъ </body> </html> C:\Users\tblaz\Documents\evelyn>
Now I wonder how to make that the default setting....
|
---|