I have an application which ran fine under 1.0.1. Now, after upgrading
to 1.1, I get errors like:
Error(UnicodeEncodeError): 'ascii' codec can't encode character u'\xa9'
in position 7021: ordinal not in range(128)
File: /usr/local/lib/python2.4/codecs.py line 178
176: """ Writes the object's contents encoded to self.stream.
178: data, consumed = self.encode(object, self.errors)
181: def writelines(self, list):
A. What is going on here? Why did these pages work fine before?
B. Is there a way to turn off this "strict" checking (if, indeed, there
are bad char's in the streams, which I didn't think I had)? I tried
setting the "endcoding_errors" option explained in the docs, but this
did not get rid of the errors. This I did by setting
PythonOption MyghtyEncodingErrors r"ignore"
in the apache httpd.conf (I'm running under mod_python).
C. Is it best to turn off unicode entirely? Currently, I have no need
for it. If turned off, should these errors go away? (I haven't tried that).
D. Is there an easy way to examine the stream so to see what exactly is
before and after the position mentioned in the error message? If indeed
there is invalid ascii, I would like to correct it...
Thanks a lot!!