#unicode_box_incorrect.pl use Win32::API; binmode(STDOUT,':utf8'); #Must set the console code page to UTF8 $SetConsoleOutputCP= new Win32::API( 'kernel32.dll', 'SetConsoleOutputCP', 'N','N' ); $SetConsoleOutputCP->Call(65001); $line1="\x{2554}".("\x{2550}"x15)."\x{2557}\n"; $line2="\x{2551}".(" "x15)."\x{2551}\n"; $line3="\x{255A}".("\x{2550}"x15)."\x{255D}"; $unicode_string=$line1.$line2.$line3; print "THIS IS THE INCORRECT EXAMPLE OUTPUT: \n"; print $unicode_string;