On 30. Sep., 10:43 h., gentlestone <[email protected]> wrote:
> On 30. Sep., 10:35 h., Andre Engels <[email protected]> wrote:
>
> > I get the feeling that the problem is with the Python interactive
> > mode. It does not have full unicode support, so u"Žabovitá zmiešaná
> > kaša" is changed to u'\x8eabovit\xe1 zmie\x9aan\xe1 ka\x9aa'. If you
> > call your code from another program, it might work correctly.
>
> > --
> > André Engels, [email protected]
>
> thx a lot
>
> I spent 2 days of my life beacause of this
>
> so doctests are unuseable for non-engish users in python - seems to be
yes, you are right, now it works:
def slugify(name):
"""
>>> slugify(u'\u017dabovit\xe1 zmie\u0161an\xe1 ka\u0161a s.r.o')
u'zabovita-zmiesana-kasa-sro'
"""
for key, value in _MAP.iteritems():
name = name.replace(key, value)
return defaultfilters.slugify(name)
--
http://mail.python.org/mailman/listinfo/python-list