Serhiy Storchaka added the comment:

First, in the context of Python a crash means a core dump or an analogue on 
Windows. In this case the code just works not as you expected.

The short answer: s should be a unicode.

In your code "ä" is encoded as 8-bit string '\xc3\xa4'. When matched, every 
bytes is independently expanded to Unicode range. The first byte becomes 
u'\xc3' = u'Ã', the second byte becomes u'¤', non-alphanumeric. '[\s\w]*' 
doesn't match u'ä'.

"ü" is encoded as 8-bit string '\xc3\xbc'. The second byte becomes u'¼', 
numeric. '[\s\w]*' matches u'ü'.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26784>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to