[Python-Dev] Python 2.0 beta 2 pre-release

Fredrik Lundh fredrik@pythonware.com
Wed, 27 Sep 2000 11:08:04 +0200

tim wrote:
> > test test_unicodedata failed -- Writing:
> > 'e052289ecef97fc89c794cf663cb74a64631d34e', expected:
> > 'b88684df19fca8c3d0ab31f040dd8de89f7836fe'
> The problem appears to be that the test uses the secret "unicode-internal"
> encoding, which is dependent upon the big/little-endianess of your

my fault -- when I saw that, I asked myself "why the heck doesn't mal
just use repr, like I did?" and decided that he used "unicode-escape"
was make to sure the test didn't break if the repr encoding changed.

too bad my brain didn't trust my eyes...

> I can reproduce your flawed hash exactly on my platform by replacing this
> line:
>         h.update(u''.join(data).encode('unicode-internal'))

I suggest replacing "unicode-internal" with "utf-8" (which is as canonical
anything can be...)