Ok. So, how do you encode .py files? UTF-8?
2010/3/3 Dave Angel <da...@ieee.org> > Giorgio wrote: > >> >>> >>>> 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? >> >> >> > Since it's a quote literal in your source code, it's encoded by your text > editor when it saves the file, and you tell Python which encoding it was by > the second line of your source file, right after the shebang line. > > A sequence of bytes in an html file should be should have its encoding > identified by the tag at the top of the html file. And I'd *guess* that on > a form result, the encoding can be assumed to match that of the html of the > form itself. > > DaveA > > -- -- AnotherNetFellow Email: anothernetfel...@gmail.com
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor