PythonWin ASP Unicode woes

Steve Holden sholden at holdenweb.com
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/dynamic.py
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\pySQL.py", line 54, in SQLUpdate
Vl = Vl + "'" + pyLib.SQLesc(Form(f.FieldName)) + "'"
File "C:\Inetpub\wwwroot\HWDynamic\pyLib.py", line 5, in SQLesc
 print >> f, s.__class__, len(unicode(s))
File "C:\Python22\lib\site-packages\win32com\client\dynamic.py", line 166,
in
 __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                                 http://www.holdenweb.com/
Python Web Programming                http://pydish.holdenweb.com/pwp/
-----------------------------------------------------------------------








More information about the Python-list mailing list