[Python-Dev] test_ucn errors ?
Fredrik Lundh
fredrik@effbot.org
Fri, 19 Jan 2001 18:37:41 +0100
> test test_ucn crashed -- exceptions.UnicodeError: Unicode-Escape decoding
> error: Illegal Unicode character
Make sure you rebuild Objects/unicodeobject.o and the
ucnhash extension. If they build without warnings, run
the following script.
import ucnhash
count = 0
for code in range(65536):
try:
name = ucnhash.getname(code)
if ucnhash.getcode(name) != code:
print name
count += 1
except ValueError:
pass
print count
if it prints anything but "10538", let me know.
> It looks like one of the unicode literals in test_ucn is invalid, but it's
> damned hard to pin down which:
If the ucnhash extension cannot be found, the script won't
even compile... shouldn't be too hard to fix.
</F>