PythonWin ASP Unicode woes

Steve Holden sholden at
Tue Aug 13 15:14:39 CEST 2002

In the process of writing some forms-handling software, I am reading data
from a memo database field, displaying it in a form, and then transmitting
the form contents to another page. When the page that processes the form
attempts to modify the memo field's value, the win32com/client/
file raises an error. This particular traceback is as a result of debug
code, but the same thing occurs when attempting str() access to the string
in the absence of the debug code.

Python ActiveX Scripting Engine (0x80020009)
Traceback (most recent call last):
File "<Script Block >", line 12, in ?
 Stmt = pySQL.SQLUpdate(Request.Form, "StdPage", (("Name","S"),), (KeyVal,),
Flist, "")
File "C:\Inetpub\wwwroot\HWDynamic\", line 54, in SQLUpdate
Vl = Vl + "'" + pyLib.SQLesc(Form(f.FieldName)) + "'"
File "C:\Inetpub\wwwroot\HWDynamic\", line 5, in SQLesc
 print >> f, s.__class__, len(unicode(s))
File "C:\Python22\lib\site-packages\win32com\client\", line 166,
 __str__ return str(self.__call__()) UnicodeError: ASCII encoding error:
ordinal not in range(128)

It would appear that conversion to Access 2000 may have somehow inserted
non-translatable Unicode characters into my memo fields, though why this
should be I don't know and I am unable to *find* any such characters in the
field concerned.

Any help would be much appreciated.

i-dislike-asp-even-more-now-ly y'rs  - steve
Steve Holden                       
Python Web Programming      

More information about the Python-list mailing list