in reply to clarification on binmode STDOUT
The source file is treated as iso-latin-1 since you didn't tell Perl otherwise. So you end up seeing the result of
decode 'UTF-8', # Your terminal encode 'UTF-8', # binmode decode 'iso-latin-1', # Perl reading the source. \ MISMATCH encode 'UTF-8', # Your editor / "Çirçös"
By telling Perl the source is UTF-8,
decode 'UTF-8', # Your terminal encode 'UTF-8', # binmode decode 'UTF-8', # Perl reading the source encode 'UTF-8', # Your editor "Çirçös"
You want:
#!/usr/bin/perl use utf8; use open ':std', ':locale'; print "Çirçös\n";
|
|---|