Output string as utf8 : Unicode « String « Perl






Output string as utf8

   

use Unicode::String;

my $string = "This is a test\n";
my $u = Unicode::String->new($string);


# print as something more human-readable
print $u->utf8;

   
    
    
  








Related examples in the same category

1.Output string as UCS2
2.utf8 Composite Character Classes
3.utf8 encode
4.utf8 encoding
5.binmode STDOUT,":utf8";
6.A stringful of 16-bit characters