DiMar wrote, on 02/12/2008 09:54 PM: > Hi all, > > I have this unicode string: > > string = u'Macworld » Jobs 1 - Twitter 0' > > and I want to replace the '»' (aka \xbb) char to '»'. > I've tried 2 ways: > > 1. >>>> string2 = string.replace('\\xbb','»') > u'Macworld \xbb Jobs 1 - Twitter 0' How about this? string.replace(u'\xbb', u'»') -- http://mail.python.org/mailman/listinfo/python-list
- Unicode char replace DiMar
- Re: Unicode char replace Martin v. Löwis
- Re: Unicode char replace DiMar
- Re: Unicode char replace Michael Goerz
- Re: Unicode char replace DiMar