Created
August 20, 2018 00:32
-
-
Save raku-cat/de5b3e9d3bca5abccaf15ac131a808cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Python 2.7 | |
-------------- | |
>> crypt.crypt(u"流れる".encode("sjis"), "ab") | |
'abPIB/We4mESk' | |
>>> | |
Python 3 | |
-------------- | |
>>> crypt.crypt("流れる".encode("sjis"), "ab") | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "/usr/lib/python3.6/crypt.py", line 47, in crypt | |
return _crypt.crypt(word, salt) | |
TypeError: crypt() argument 1 must be str, not bytes | |
>>> crypt.crypt("流れる", "ab") | |
'abyRtHwM0paQs' | |
>>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment