[web2py] problem with character encoding

2012-02-02 Thread peter
I am reading some text from a web site, using f=urllib.urlopen(), and then s=f.read() I then extract a bit of 's' as s1, s1 contains Na Ponta Do Pé The é is encoded in a single byte as 0XE9. If I do IS_SLUG.urlify(s1) it throws and error because 0XE9 is not a valid character. I believe the

Re: [web2py] problem with character encoding

2012-02-02 Thread Jonathan Lundell
On Feb 2, 2012, at 2:24 PM, peter wrote: I am reading some text from a web site, using f=urllib.urlopen(), and then s=f.read() I then extract a bit of 's' as s1, s1 contains Na Ponta Do Pé The é is encoded in a single byte as 0XE9. If I do IS_SLUG.urlify(s1) it throws and error