> > >> Depends on your python version. If you use python 2.x, you have to use a > u before the string: > > s = u'Hallo World'
Ok. So, let's go back to my first question: s = u'Hallo World' is unicode in python 2.x -> ok s = 'Hallo World' how is encoded? >> I think the encoding of the db doesn't matter much in this case, but I > would prefer utf-8 over latin-1. If you get an utf-8 encoded raw byte string > you call .decode('utf-8'). In case of an latin-1 encoded string you call > .decode('latin1') > Ok, setting it to UTF-8. > If you don't know the encoding on the way in, reject the input. > > Well, the problem comes, i.e when i'm getting a string from an HTML form with POST. I don't and can't know the encoding, right? It depends on browser. Giorgio -- -- AnotherNetFellow Email: anothernetfel...@gmail.com
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor