hakonhagland

utf-8

May 6th, 2021
479
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.  
RAW Paste Data