Time we switched to unicode? (was Explanation of this Python language feature?)

Chris Angelico rosuav at gmail.com
Tue Mar 25 05:29:48 CET 2014


On Tue, Mar 25, 2014 at 3:08 PM, Rustom Mody <rustompmody at gmail.com> wrote:
> And Chris is right in (rephrasing) we may have unicode-happy OSes and
> languages. We cant reasonably have unicode-happy keyboards.
> [What would a million-key keyboard look like? Lets leave the cost aside...]

Actually, it wouldn't be that bad. Unicode allows for only 1114112
characters (thanks to UTF-16), of which only the first three planes
have any actual characters on them (so, a maximum of about 200K
characters). All you'd need would be a system that organizes them
(using their hex codepoints isn't exactly useful), and you could type
any character with a maximum of, say, 6-8 keystrokes; Huffman coded,
of course, so the average would be 1.5 keystrokes per character
actually used. Add one meta key: Charset. Hold that and press L and
you get (say) λ, U+03BB; Charset+Shift+L is Λ, U+039B. Ctrl+Charset+L
might give you a Cyrillic л (U+043B), and Ctrl+Charset+Shift+L would
then be Л (U+041B), the upper-case version of that.

Emacs users would love it.

ChrisA



More information about the Python-list mailing list