def handle_entityref(self, name):
char_code = html_entities.name2codepoint.get(name, None)<EOL>if char_code is not None:<EOL><INDENT>try:<EOL><INDENT>self.result += unichr(char_code).encode("<STR_LIT:utf-8>")<EOL><DEDENT>except:<EOL><INDENT>return<EOL><DEDENT><DEDENT>
Process a general entity reference of the form "&name;".
        Transform to text whenever possible.