#!/usr/bin/perl use strict; use warnings; use charnames ':full'; use Encode; # TODO: determine encoding of STDOUT my $enc_of_stdout; # compilation window of emacs is encoded in UTF8 $enc_of_stdout = 'utf8'; # cmd window in Windows XP is encoded in CP437 #$enc_of_stdout = 'cp437'; binmode(STDOUT,":encoding($enc_of_stdout)"); # same as: "\x{f2}" my $text_str = "\N{LATIN SMALL LETTER O WITH GRAVE}"; print "$text_str\n";