Advertisement
hakonhagland

utf-8

May 6th, 2021
1,433
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.23 KB | None | 0 0
  1. use feature qw(say);
  2. use strict;
  3. use warnings;
  4. use utf8;
  5. use Encode qw(encode_utf8);
  6.  
  7. binmode STDOUT, ':encoding(utf-8)';
  8. my $str = "Región";
  9. printf "1: %vX\n", $str;
  10. my $str2 = encode_utf8($str);
  11. printf "2: %vX\n", $str2;
  12.  
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement