[issue2948] Unicode support for hashing algorithms
Vasco Rodrigues
report at bugs.python.org
Fri May 23 06:19:47 CEST 2008
Vasco Rodrigues <a29192 at ualg.pt> added the comment:
You could just make a check for unicode strings and issue the encode in
the hash function.
I understand the byte abstraction, but if you issue an encode on a
unicode string with only ascii chars it gets converted to the same in
ascii, result will be the same.
So i got to do md5(u'joão'.encode("utf-8"))?
Wasn't unicode becoming the default?
If I do md5(u'john'), it works. And that's a unicode string. It should
have told me, no unicode then...
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2948>
__________________________________
More information about the Python-bugs-list
mailing list