> My problem is more complex than this, but how about I boil down one sticking > point for starters. I have a file with a Spanish word in it, "años", which I > wish to read with:
What is the encoding of that file? Without a correct answer to that question, you will not be able to achieve what you want. Possible answers are "iso-8859-1", "utf-8", "windows-1252", and "cp850" (these all support the word "años") > Instead of seeing "año" I see "a?o". BAD BAD BAD I don't see anything here. Where do you see the question mark? Did you perhaps run the CGI script in a web server, and pointed your web browser to the web page, and saw the question mark in the web browser? > WHAT GIVES? Sending "Content-type: text/html" is not enough. The web browser needs to know what the encoding is. So you should send Content-type: text/html; charset="your-encoding-here" Use "extras/page information" in Firefox to find out what the web browser thinks the encoding of the page is. Regards, Martin P.S. Please, stop shouting. -- http://mail.python.org/mailman/listinfo/python-list