"Gigs_" <[EMAIL PROTECTED]> wrote in message
> here is the code:

So where do you think you tell Python that you are
using unicode strings?

I'm no expert but I think, as a minimum you need:

for i in S:
  S = S.replace(u'æ', u'ć')
  S = S.replace(u'è', u'č')
  S = S.replace(u'ð', u'đ')

You might also need to specify a locale/encoding,
but I'm not sure about that...

BTW THere is a translate() somewhere function in Python
that might enable you to do all the translations in one step.
You specify a set of characters to translate and the
corresponding translations. Sounds a lot like what you
want - if it works with unicode...

Regards,

Alan G. 


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to