[EMAIL PROTECTED] wrote:
> 
> I have tried to test RE and UTF-8 in Python generally and the results
> are even more confusing (done with locale cs_CZ.UTF-8 in konsole):
> 
>>>locale.getpreferredencoding()
> 
> 'UTF-8'
> 
>>>>print re.sub("(\w*)","X","[Chelcický]",re.L)

You first have to turn the raw strings into Unicode strings. It seems on
your console it should be:

unicode('[Chelcický]','utf-8')

Note that you have to set HTTP headers and <form accept-charset=...> in
web applications.

Ciao, Michael.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to