Replace special characters in python
- by Marcos Placona
Hi, I have some text coming from the web as such:
£6.49
Obviously I would like this to be displayed as:
£6.49
I have tried the following so far:
s = url['title']
s = s.encode('utf8')
s = s.replace(u'Â','')
And a few variants on this (after finding it on this very same forum)
But still no luck as I keep getting:
UnicodeDecodeError: 'ascii' codec
can't decode byte 0xc3 in position
100: ordinal not in range(128)
Could anyone help me getting this right?
UPDATE:
Adding the reppr examples and content type
u'Star Trek XI £3.99'
u'Oscar Winners Best Pictures Box Set \xc2\xa36.49'
Content-Type: text/html; charset=utf-8
Thanks in advance