Giorgio wrote:
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? And, what's the default string encoding in
python?
I think the safest way is to use unicode strings in your application and
convert them to byte strings if needed, using the encode and decode methods.
the other question is about mysql DB: if i have a mysql field latin1 and
extract his content in a python script, how can I handle it?
if you have a byte string s encoded in 'latin1' you can simply call:
s.decode('latin1')
to get the unicode string.
thankyou
Giorgio
Patrick
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor