Bug in CGI::unescapeHTML?

Hi,

I think there’s a bug in CGI::unescapeHTML. Or am I doing something
wrong?

$KCODE=‘u’
CGI::unescapeHTML(“ã”)

will return “\343”, which according to my screaming mysql utf-8 encoded
database is not a valid utf-8 sequence

The source of CGI::unescapeHTML reveals that all values < 255 are simply
translated to the ascii value using the value.chr

Greetings,

Esad

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs