'Required:
\'line\' -- the line
Logic:
get the hex_num and look it up in the default dictionary. If the
token is in the dictionary, then check if the value starts with a
"&". If it does, then tag the result as utf text. Otherwise, tag it
as normal text.
If the hex_num is not in the dictionary, then a mistake has been
made.'

def __hex_text_func(self, line):

    hex_num = line[17:(-1)]
    converted = self.__current_dict.get(hex_num)
    if (converted is not None):
        if (converted[0:1] == '&'):
            font = self.__current_dict_name
            if (self.__convert_caps and (self.__caps_list[(-1)] == 'true') and (font not in ('Symbol', 'Wingdings', 'Zapf    Dingbats'))):
                converted = self.__utf_token_to_caps_func(converted)
            self.__write_obj.write(('tx<ut<__________<%s\n' % converted))
        else:
            font = self.__current_dict_name
            if (self.__convert_caps and (self.__caps_list[(-1)] == 'true') and (font not in ('Symbol', 'Wingdings', 'Zapf    Dingbats'))):
                converted = converted.upper()
            self.__write_obj.write(('tx<nu<__________<%s\n' % converted))
    else:
        token = hex_num.replace("'", '')
        the_num = 0
        if token:
            the_num = int(token, 16)
        if (the_num > 10):
            self.__write_obj.write(('mi<tg<empty-att_<udef_symbol<num>%s<description>not-in-table\n' % hex_num))
            if (self.__run_level > 4):
                msg = ('Character    "&#x%s;"    does    not    appear    to    be    valid    (or    is    a    control    character)\n' % token)
                raise self.__bug_handler, msg
