Why is this A0 character appearing in my HTML::Element output?

Viewed 23551

I'm parsing an HTML document with a couple Perl modules: HTML::TreeBuilder and HTML::Element. For some reason whenever the content of a tag is just  , which is to be expected, it gets returned by HTML::Element as a strange character I've never seen before:

alt text http://www.freeimagehosting.net/uploads/2acca201ab.jpg

I can't copy the character so can't Google it, couldn't find it in character map, and strangely when I search with a regular expression, \w finds it. 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.

How can I detect and replace this character with something more useful like null and how should I deal with strange characters like this in the future?

2 Answers
Related