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 "<pyshell#20>", line 1, in -toplevel- locale.strxfrm(s) UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 0: ordinal not in range(128) >>> Someone sees what I did wrong ? -- http://mail.python.org/mailman/listinfo/python-list