in reply to use HTML::Entities to encode only characters >= 256?

encode_entities(encode_entities($text, q{<>&"'}), '^\0-\377')

Update: Oops, changed 0 to \0.

Replies are listed 'Best First'.
Re^2: use HTML::Entities to encode only characters >= 256?
by pc88mxer (Vicar) on Nov 02, 2007 at 16:38 UTC
    Thanks for the reply! I didn't realize that you could specify negation in the second parameter to encode_entities().

    The HTML::Entities documentation should make it clearer that the second argument is just wrapped in square brackets and treated as a regular expression.