# create a file in notepad with the single unicode character U+2190 #(left arrow) # on the 2nd line, save as "UTF8" open ( FH, "<:encoding(UTF-8)", "file.txt"); # since the BOM (byte order mark) will be read, we dont want it #printed, so skip the first line. this is why we typed the arrow on #the second line # NOT first line! ; # now we are at the second line, save the arrow that should be here my $line = ; # this gets rid of the wide character warning, as we know it is UTF8 utf8::encode($line); # toggle between the following two print statements to see how they # differ # note the first one should print fine, but is kind of useless because # if you print anything else, the output will be incorrect. maybe #because of mixing encodings, but it works fine redirected to a file. # the second print statement shows this #print "$line"; #print "($line)"