[Tutor] Encoding
Stefan Behnel
stefan_ml at behnel.de
Wed Mar 3 10:06:06 CET 2010
Giorgio, 03.03.2010 09:36:
> i am looking for more informations about encoding in python:
>
> i've read that Amazon SimpleDB accepts every string encoded in UTF-8. How
> can I encode a string?
byte_string = unicode_string.encode('utf-8')
If you use unicode strings throughout your application, you will be happy
with the above. Note that this is an advice, not a condition.
> And, what's the default string encoding in python?
"default encodings" are bad, don't rely on them.
Stefan
More information about the Tutor
mailing list