devmage has asked for the wisdom of the Perl Monks concerning the following question:

Greetings, I have some text with HTML escaped characters in it like í is í and ó is ó. They are all characters in the Spanish alphabet. I need to convert them back to ascii and was looking for a perl module that did it but havn't found one yet. Can anyone please suggest something?

Thanks!

Devmage

Replies are listed 'Best First'.
Re: Unescaping HTML Escapes
by antirice (Priest) on Oct 15, 2003 at 16:09 UTC

    Check out the decode_entities sub of HTML::Entities.

    Hope this helps.

    antirice    
    The first rule of Perl club is - use Perl
    The
    ith rule of Perl club is - follow rule i - 1 for i > 1

Re: Unescaping HTML Escapes
by Ovid (Cardinal) on Oct 15, 2003 at 16:10 UTC
      Perfect! You rock. You have no idea how much time I spent looking for that. Unfortunately its not an easy search subject :) Devmage
Re: Unescaping HTML Escapes
by etcshadow (Priest) on Oct 15, 2003 at 20:22 UTC
    Of course, you can't convert them to ASCII, because they aren't ASCII characters. ASCII is only the characters below 127. Either you need to understand character encoding a little better, or you made a typo (or both). Of course, HTML::Entities seems to handle ISO-8859-1 and Unicode properly, so that's good.

    ------------
    :Wq
    Not an editor command: Wq