[New-bugs-announce] [issue24422] base64 not encode correctly
Hector Cloud
report at bugs.python.org
Wed Jun 10 11:56:19 CEST 2015
New submission from Hector Cloud:
I use Python 3.4.0 now. But its base64 encoding is not as expected.
----------------------------
import base64
ascii = base64.b64encode(u"YAU-interview-revised20120921".encode(), b'-_')
print(ascii)
----------------------------
The result is b'WUFVLWludGVydmlldy1yZXZpc2VkMjAxMjA5MjE='. There is a character '=' at the end which is not expected. In my opinion, the result should contain characters [A-Za-z0-9] and '-_'. The '=' should not be in the encoding result.
Is it a bug?
----------
components: Library (Lib)
messages: 245123
nosy: Hector Cloud
priority: normal
severity: normal
status: open
title: base64 not encode correctly
type: behavior
versions: Python 3.4
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24422>
_______________________________________
More information about the New-bugs-announce
mailing list