[IronPython] base64 bug

Sanghyeon Seo sanxiyn at gmail.com
Mon Nov 13 05:21:57 CET 2006


I wrote:
> >>> import base64
> >>> base64.decodestring('w/==')
> '\xc3'
>
> Now, imagine, what kind of debugging hell the above bug entailed.

2006/11/13, Fredrik Lundh <fredrik at pythonware.com>:
> on the other hand:
>
> >>> base64.encodestring("\xc3")
> 'ww==\n'
>
> so it's really the encoder that's broken.

Okay. Here's the valid case IronPython is misbehaving:

>>> base64.decodestring('w/A=')
'\xc0'

Correct decoding is '\xc3\xf0'. The real issue here is that IronPython
ignores slashes.

-- 
Seo Sanghyeon



More information about the Ironpython-users mailing list