- or download this
#!/usr/bin/perl
use strict;
...
# also prints a smiley, but issues "Wide character in print" warning f
+irst.
_utf8_on($smiley);
print $smiley . "\n";
- or download this
#!/usr/bin/perl
use strict;
...
packed num: 0 0 0 128
non-utf8 concat: 102 111 111 0 0 0 128
utf8 concat: 102 111 111 0 0 0 194 128
- or download this
print $utf8; # UTF8 flag is on
print $non_utf8; # UTF8 flag is off
...
# produces translated output after manual intervention
my $translated_to_utf8 = Encode::decode("iso-8859-1", $non_utf8);
print $utf8 . $translated_to_utf8;