When I run this script I see the garbage, but if I remove binmode line:#!/usr/bin/perl binmode STDOUT, ':utf8'; print "Çirçös\n";
then 'Çirçös' is printed correctly. Since my console is already in utf-8, I expected correct output both times. What could be wrong here?#!/usr/bin/perl print "Çirçös\n";
In reply to clarification on binmode STDOUT by rmflow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |