When I convert the returned document to ANSI or UTF-8 it disappears altogether.I couldn't find any info on it in the HTML:: Element documentation either.If your text is not encoded in ISO-8859-1, you do not need this function.If your text is already in UTF-8, you do not need this function.So what I did was use return_value.gsub(/[\x A0]/n,"") instead and it worked perfectly fine for me.
If you need to convert any text from any encoding to any other encoding, look at iconv() instead.
Your problem is that you want to do a method call but instead you're creating a Regexp.
You're searching and replacing strings consisting of the string "160" followed by any character and then the string "chr", and then doing the same except with "160" replaced with "194".
Please note that utf8_encode only converts a string encoded in ISO-8859-1 to UTF-8.
A more appropriate name for it would be "iso88591_to_utf8".