On Wed, Nov 27, 2013 at 4:30 PM, <bangpypers-requ...@python.org> wrote:

> I have an input string to the script. I do not know the encoding of the
> string.
>

Instead of guessing the encoding like you're doing, you should use a
library like https://pypi.python.org/pypi/chardet

Once the encoding is detected, you will need to change the encoding from
the detected encoding to utf-8.
_______________________________________________
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers

Reply via email to