Exemplo n.º 1
0
 def test_character_name(self):
     ' Test character naming '
     from calibre.utils.unicode_names import character_name_from_code
     for q, e in {
             '\U0001f431': 'CAT FACE'
             }.items():
         self.ae(icu.character_name(q), e)
         self.ae(character_name_from_code(icu.ord_string(q)[0]), e)
Exemplo n.º 2
0
 def test_character_name(self):
     ' Test character naming '
     from calibre.utils.unicode_names import character_name_from_code
     for q, e in {
             '\U0001f431': 'CAT FACE'
             }.items():
         self.ae(icu.character_name(q), e)
         self.ae(character_name_from_code(icu.ord_string(q)[0]), e)
Exemplo n.º 3
0
 def update_position(self, line=None, col=None, character=None):
     if line is None:
         self.la.setText('')
     else:
         try:
             name = character_name(character) if character and tprefs['editor_show_char_under_cursor'] else None
         except Exception:
             name = None
         text = _('Line: {0} : {1}').format(line, col)
         if not name:
             name = {'\t':'TAB'}.get(character, None)
         if name and tprefs['editor_show_char_under_cursor']:
             text = name + ' : ' + text
         self.la.setText(text)
Exemplo n.º 4
0
 def update_position(self, line=None, col=None, character=None):
     if line is None:
         self.la.setText('')
     else:
         try:
             name = character_name(character) if character and tprefs['editor_show_char_under_cursor'] else None
         except Exception:
             name = None
         text = _('Line: {0} : {1}').format(line, col)
         if not name:
             name = {'\t':'TAB'}.get(character, None)
         if name and tprefs['editor_show_char_under_cursor']:
             text = name + ' : ' + text
         self.la.setText(text)
Exemplo n.º 5
0
 def update_position(self, line=None, col=None, character=None):
     if line is None:
         self.la.setText("")
     else:
         try:
             name = character_name(character) if character and tprefs["editor_show_char_under_cursor"] else None
         except Exception:
             name = None
         text = _("Line: {0} : {1}").format(line, col)
         if not name:
             name = {"\t": "TAB"}.get(character, None)
         if name and tprefs["editor_show_char_under_cursor"]:
             text = name + " : " + text
         self.la.setText(text)
Exemplo n.º 6
0
 def test_character_name(self):
     ' Test character naming '
     self.ae(icu.character_name('\U0001f431'), 'CAT FACE')
Exemplo n.º 7
0
 def test_character_name(self):
     ' Test character naming '
     self.ae(icu.character_name('\U0001f431'), 'CAT FACE')
Exemplo n.º 8
0
 def test_character_name(self):
     self.ae(icu.character_name('\U0001f431'), 'CAT FACE')
Exemplo n.º 9
0
 def test_character_name(self):
     self.ae(icu.character_name("\U0001f431"), "CAT FACE")