def handle_charref(self, name):
try:<EOL><INDENT>self.result += unichr(int(name)).encode("<STR_LIT:utf-8>")<EOL><DEDENT>except:<EOL><INDENT>return<EOL><DEDENT>
Process character references of the form "&#ref;". Transform to text whenever possible.