Help for this page

Select Code to Download


  1. or download this
    open(my $fh, '>:encoding(UTF-8)', ...) or die;
    print($fh $text);
    
  2. or download this
    use open ':std', ':encoding(UTF-8)';
    print($text);
    
  3. or download this
    use Encode qw( encode );
    print($fh encode("UTF-8", $text));
    
  4. or download this
    use Encode qw( encode );
    print(encode("UTF-8", $text));
    
  5. or download this
    >perl -wle"print chr(0x2660)"
    Wide character in print at -e line 1.
    ...
    
    >perl -MData::Dumper -we"print Dumper chr(0x2660)"
    $VAR1 = "\x{2660}";