Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.