Help for this page

Select Code to Download


  1. or download this
    use HTML::Entities;
    
    ...
    
    $encoded = encode_entities($input, "\xA0-\x{FFFD}");
    print "$encoded\n";
    
  2. or download this
    abc < &auml; > <p> &Ouml; & &uuml; xyz 
    abc < &auml; > <p> &Ouml; & &uuml; xyz &#x5555; &#x8888;
    
  3. or download this
    s/([\xA0-\x{FFFD}])/$char2entity{$1} || num_entity($1)/ge;
    
  4. or download this
    $encoded = encode_entities($input, "^\x20-\x7E");  # do not encode pri
    +ntable ASCII chars