As far as I have looked at the source code for HTMLParser, it can't handle other charsets then ASCII.
2009/3/26 秦锋 <feng.w....@gmail.com>: > > When I'm using HTMLParser to access a link below: > > http://www.stats.gov.cn/tjsj/ndsj/2007/html/C0301c.htm > > SDK keeps reporting: > > <pre>Traceback (most recent call last): > File "C:\Program Files\Google\google_appengine\google > \appengine > \ext\webapp\__init__.py", line 498, in __call__ > handler.get(*groups) > File "D:\Data\Documents\Workspace\CNStatsSvr\src > \spider.py", line 134, in get > parser.close() > File "C:\Python25\lib\HTMLParser.py", line 112, in close > self.goahead(1) > File "C:\Python25\lib\HTMLParser.py", line 164, in > goahead > self.error("EOF in middle of construct") > File "C:\Python25\lib\HTMLParser.py", line 115, in error > raise HTMLParseError(message, self.getpos()) > HTMLParseError: EOF in middle of construct, at line 8, column 1 > </pre> > > I know it's a python question, is there anyone could help? > Thanks! > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---