I\'m having some brain failure in understanding reading and writing text to a file (Python 2.4).
# The string, which has an a-acute in it. ss = u\'Capit\\xe1
To read in an Unicode string and then send to HTML, I did this:
fileline.decode("utf-8").encode('ascii', 'xmlcharrefreplace')
Useful for python powered http servers.