Friday Finking: Beyond implementing Unicode
Elliott Roper
nospam at yrl.co.uk
Fri Jun 12 07:05:31 EDT 2020
On 12 Jun 2020 at 09:47:04 BST, "moi" <wxjmfauth at gmail.com> wrote:
> i) Today there people, who are still not understanding this:
>
>>>> 'Å'.encode('utf-8')
> b'\xc3\x85'
>>>> 'Å'.encode('utf-16-le')
> b'\xc5\x00'
>>>> 'Å'.encode('utf-32-le')
> b'\xc5\x00\x00\x00'
>
> ii) On a Western Europen Windows, Py 3 is not even working
> correctly with the *characters* of the Windows-1252 coding
> scheme. (As I understand this issue, you may have the same
> problem on let say an iso-8859-2 platform).
>
> iii) When it works, I mean when it *by chance* works, the
> result is all by satisfying:
>
>>>> import timeit
>>>> timeit.timeit("s.encode('utf-8')", "s = 'Universität Zürich' * 1000")
> 50.96167644299999
>>>> timeit.timeit("s.encode('utf-8')", "s = 'Universitat Zurich' * 1000")
> 2.4885878450000973
>>>>
>
>
> iv) ...
> v) ...
> vi) ...
i) Who cares?
ii) Breaking News. Windows is mired in backward compatibility.
iii) My 3 year old Mac is 5 times faster than that. Get over it.
Maths always made its greatest advances after notation improved.
Terseness and unambiguity are king.
You are looking backward.
DL Neil is looking forward. A long way forward. It won't be our generation,
our brains are already mis-wired.
--
To de-mung my e-mail address:- fsnospam$elliott$$
PGP Fingerprint: 1A96 3CF7 637F 896B C810 E199 7E5C A9E4 8E59 E248
More information about the Python-list
mailing list