Skip to content

base64_cipher.py does not yet support Unicode #1027

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fbigun opened this issue Jul 16, 2019 · 6 comments
Closed

base64_cipher.py does not yet support Unicode #1027

fbigun opened this issue Jul 16, 2019 · 6 comments

Comments

@fbigun
Copy link

fbigun commented Jul 16, 2019

def encodeBase64(text):

root@localhost$ python3
Python 3.6.8 (default, Jan 14 2019, 11:02:34) 
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> s="woshi谁"
>>> s
'woshi谁'
>>> encodeBase64(s)
'd29zaPUBA==='
@poyea
Copy link
Member

poyea commented Jul 16, 2019

I'm guessing these functions do not work for Chinese characters.

@cclauss
Copy link
Member

cclauss commented Jul 16, 2019

@fbigun Can you please edit the title of this issue to base64_cipher.py does not yet support Unicode so that we have a feature request? Python 2 support is no longer required.

@fbigun fbigun changed the title The result of running in python3 is not normal base64_cipher.py does not yet support Unicode Jul 16, 2019
@fbigun
Copy link
Author

fbigun commented Jul 16, 2019

@cclauss
The title has been changed

@laurent-pck
Copy link
Contributor

I made the PR #1316 for this. I hope that using bytes() and str() is ok for you.

@github-actions
Copy link

github-actions bot commented Dec 8, 2019

Stale issue message

@cclauss
Copy link
Member

cclauss commented Dec 8, 2019

Closed in #1316

@cclauss cclauss closed this as completed Dec 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants