[BangPypers] Internationalization in Python 2.6

Vijay Ramachandran vijay750 at gmail.com
Wed Nov 27 16:21:41 CET 2013


On Wed, Nov 27, 2013 at 4:30 PM, <bangpypers-request at 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.


More information about the BangPypers mailing list