Re: [Tutor] trying to convert pycurl/html to ascii

2015-03-29 Thread Cameron Simpson
On 29Mar2015 21:49, bruce wrote: Doing a quick/basic pycurl test on a site and trying to convert the returned page to pure ascii. And if the page cannot be representing in ASCII? The page has the encoding line The test uses pycurl, and the StringIO to fetch the page into a str. Which Stri

Re: [Tutor] trying to convert pycurl/html to ascii

2015-03-29 Thread Dave Angel
On 03/29/2015 09:49 PM, bruce wrote: Hi. Doing a quick/basic pycurl test on a site and trying to convert the returned page to pure ascii. You cannot convert it to pure ASCII. You could replace all the invalid characters with some special one, like question marks. But I doubt if that's what

[Tutor] trying to convert pycurl/html to ascii

2015-03-29 Thread bruce
Hi. Doing a quick/basic pycurl test on a site and trying to convert the returned page to pure ascii. The page has the encoding line The test uses pycurl, and the StringIO to fetch the page into a str. pycurl stuff . . . foo=gg.getBuffer() -at this point, foo has the page in a str buffer. W