#!/usr/bin/perl -- use strict; use warnings; #~ use utf8; # no help #~ use feature 'unicode_strings'; # no help # turns off wide but CORRUPTS output #~ binmode STDOUT, ':encoding(UTF-8)'; binmode STDOUT; # wide character in print print qq!\x{FEFF}!; # print BOM print "Foo \xE2\x80\x94 Bar";