in reply to Re: Convert strings with unknown encodings to html
in thread Convert strings with unknown encodings to html

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.

  • Comment on Re^2: Convert strings with unknown encodings to html