I think I always get tied up by utf-8 encoding and web2py is no exception. I'm uploading a text file, extracting some info, which I stuff into Fields, and then writing the modified text file to an upload Field. The Fields that I directly write from data read from the original text file all look OK. Something like Español ends up looking like Español. However, for the upload Field, Español ends up looking like Español.
Two questions: does web2py treat encoding of field data and file streams differently? If I want to write the file so that Español reads Español, how do I do it? What encoding is needed?

