Re: md5 hash problems

2008-09-30 Thread Chris Rebert
On Tue, Sep 30, 2008 at 2:25 PM, Michele <[EMAIL PROTECTED]> wrote: > Hi there, > why is this code generating a problem? > input = open('foo.img','rb').read().decode('ISO-8859-1') import md5 md5.new(input).hexdigest() > Traceback (most recent call last): > File "", line 1, in > Uni

md5 hash problems

2008-09-30 Thread Michele
Hi there, why is this code generating a problem? >>> input = open('foo.img','rb').read().decode('ISO-8859-1') >>> import md5 >>> md5.new(input).hexdigest() Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' codec can't encode character u'\xdc' in position 6: ordi