Re: strxfrm works with unicode string ?

2005-06-17 Thread nicolas . riesch
Gruëzi, Gerald ;-) Well, ok, but I don't understand why I should first convert a pure unicode string into a byte string. The encoding ( here, latin-1) seems an arbitrary choice. Your solution works, but is it a workaround or the real way to use strxfrm ? It seems a little artificial to me, but pe

strxfrm works with unicode string ?

2005-06-17 Thread nicolas . riesch
I am trying to use strxfm with unicode strings, but it does not work. This is what I did: >>> import locale >>> s=u'\u00e9' >>> print s é >>> locale.setlocale(locale.LC_ALL, '') 'French_Switzerland.1252' >>> locale.strxfrm(s) Traceback (most recent call last): File "", line 1, in -toplevel-