Help for this page

Select Code to Download


  1. or download this
    $utf8 = Encode::decode('assumed-encoding-of-s', $s)
    
  2. or download this
    print unpack("H*", $s);
    
  3. or download this
    use Encode "encode";
    
    ...
        printf "%-6s : %s\n", $encoding,
                              unpack("H*", $a_enc->{$encoding});
    }
    
  4. or download this
    ascii  : 3f
    cp932  : 82a0
    ...
    ucs2be : 3042
    ucs2le : 4230
    utf8   : e38182
    
  5. or download this
    $html_entity = '&#x'.unpack("H*", encode("ucs2be", $ch)).';';