i can't figure out what's the problem (i also used re with same
results). how should i replace a pattern with non-ascii char?

working as expected:
In [27]: s
Out[27]: 'asd'
In [28]: s = s.replace("s", "š")
In [29]: s
Out[29]: 'a\xc5\xa1d'

not working on model fields:
In [30]: p = Page.objects.all()[0]
In [31]: p
Out[31]: <Page: nestoćšđČĆŽĐŠš>
In [32]: p.name.replace("sto", "š")
---------------------------------------------------------------------------
<type 'exceptions.UnicodeDecodeError'>    Traceback (most recent call
last)

/home/aljosa/Projects/nn/<ipython console> in <module>()

<type 'exceptions.UnicodeDecodeError'>: 'ascii' codec can't decode
byte 0xc5 in position 0: ordinal not in range(128)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to