I have encounter a problem with utf8 some chinese character

2 views
Skip to first unread message

billpeace

unread,
Jun 14, 2009, 2:23:57 PM6/14/09
to beautifulsoup
there are some problem in htmlparser.py

Problem is:
part of html source code is like follow
u '<font size=4.5 face=\u6977\u4f53_GB2312>'

in "/usr/lib/python2.5/HTMLParser.py", line 263, in parse_starttag
attrname, rest, attrvalue = m.group(1, 2, 3)

when there are exist utf8 code , Regular can't capture correct groups
in the pattern

face=\u6977\u4f53_GB2312 :

attrname='face'
rest= '='
attrvalue= ' '

how can i get correct groups

Reply all
Reply to author
Forward
0 new messages