cepl at surfbest.net 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.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4