Test for a unicode string

Thorsten Kampe thorsten at thorstenkampe.de
Thu Oct 25 12:52:30 CEST 2007

* goldtech (Wed, 24 Oct 2007 12:09:24 -0700)
> I have a regular expression test in a script. When a unicode character
> get tested in the regex it gives an error:

As Martin pointed out: you are *not* using unicode...
> Question: Is there a way to test a string for unicode chars (ie. test
> if a string will throw the error cited above).

There is but this is not your problem and if it was it wouldn't be the 
right solution.

Read http://www.amk.ca/python/howto/unicode. You should at least have 
a minimal understanding of unicode before trying to use unicode.
> Thanks, still using Python 2.1

Best way to get yourself into trouble.


More information about the Python-list mailing list