Umlauts revisited: Now they prevent program from running
Franz GEIGER
fgeiger at datec.at
Fri Jan 26 08:11:20 EST 2001
I pull data out of an Excel sheet using DAO. There are field values
containing text strings. Everything works fine until a text reads e.g.
"Stück".
After stopping before the exception
"UnicodeError: ASCII encoding error: ordinal not in range(128)"
occurs I display the field in the interactive window of PythonWin
(ActiveState 2.0 on NT4) by simply typing "fld.Value".
It displays u'St\374ck'.
Conversion into a Python string by applying print or str() yields:
"Traceback (innermost last):
File "<interactive input>", line 1, in ?
UnicodeError: ASCII encoding error: ordinal not in range(128)"
Any idea how to overcome this?
Best regards
Franz GEIGER
More information about the Python-list
mailing list