GUI toolkit(s) status
wxjmfauth at gmail.com
wxjmfauth at gmail.com
Mon Nov 24 14:24:48 EST 2014
Le samedi 22 novembre 2014 20:35:01 UTC+1, Christian Gollwitzer a écrit :
> Am 22.11.14 19:33, schrieb wxjmfauth at gmail.com:
> > As you are rewriting unicode, a small suggestion/request.
> >
> > Assume that one processes a part of the Bible in polytonic
> > Greek, one has to create a ton of temporary (locale) letters,
>
> <°)))o>< αὐτὸν τὸν ἰχθύα
>
> ὁ Χριστιανὸς ἔγραψε τρόλλοι
Nice,
>>> import unicodedata as ud
>>> for c in ud.normalize('NFKD', s):
... 'U+{:#04} {}'.format(ord(c), ud.name(c))
...
'U+0959 GREEK SMALL LETTER OMICRON'
'U+0788 COMBINING REVERSED COMMA ABOVE'
'U+0032 SPACE'
'U+0935 GREEK CAPITAL LETTER CHI'
'U+0961 GREEK SMALL LETTER RHO'
'U+0953 GREEK SMALL LETTER IOTA'
'U+0963 GREEK SMALL LETTER SIGMA'
'U+0964 GREEK SMALL LETTER TAU'
'U+0953 GREEK SMALL LETTER IOTA'
'U+0945 GREEK SMALL LETTER ALPHA'
'U+0957 GREEK SMALL LETTER NU'
'U+0959 GREEK SMALL LETTER OMICRON'
'U+0768 COMBINING GRAVE ACCENT'
'U+0962 GREEK SMALL LETTER FINAL SIGMA'
'U+0032 SPACE'
'U+0949 GREEK SMALL LETTER EPSILON'
'U+0787 COMBINING COMMA ABOVE'
'U+0769 COMBINING ACUTE ACCENT'
'U+0947 GREEK SMALL LETTER GAMMA'
'U+0961 GREEK SMALL LETTER RHO'
'U+0945 GREEK SMALL LETTER ALPHA'
'U+0968 GREEK SMALL LETTER PSI'
'U+0949 GREEK SMALL LETTER EPSILON'
'U+0032 SPACE'
'U+0964 GREEK SMALL LETTER TAU'
'U+0961 GREEK SMALL LETTER RHO'
'U+0959 GREEK SMALL LETTER OMICRON'
'U+0769 COMBINING ACUTE ACCENT'
'U+0955 GREEK SMALL LETTER LAMDA'
'U+0955 GREEK SMALL LETTER LAMDA'
'U+0959 GREEK SMALL LETTER OMICRON'
'U+0953 GREEK SMALL LETTER IOTA'
>>>
but it is however not explaining why
serious tools does not have to waste time in
encoding to save memory.
>>> sys.getsizeof(s)
84
>>> sys.getsizeof(s.encode('utf-16-le'))
71
More information about the Python-list
mailing list