This does not appear to be correct. The very first reply suggested a module that will detect the encoding for each character individually. Graff also replied with a general outline for doing so. Using eval to catch when decode croaks was the main piece I was missing. It may sound obvious in hindsight, but my mind just wasn't getting there. I kept trying to figure out how to determine if it was safe to pass a string to decode.
In reply to Re^2: Convert strings with unknown encodings to html
by Pascal666
in thread Convert strings with unknown encodings to html
by Pascal666
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |