doherty/utf8-all — Issue #9: "print $!" prints bad characters
Author: olegwtf
Created: 2012-01-14 07:08:57+00:00
State: open

use strict;
use utf8::all;
use IO::Socket;

unless (IO::Socket::INET->new("localhost:1111")) {
print $!, "\n";
}

On my system this program prints unreadable characters `Ð ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ð¸ Ð¾ÑÐºÐ°Ð·Ð°Ð½Ð¾`
My locale is ru_RU.UTF-8. At the same time `die $!, "\n";` prints correct characters.