• M
    Python encoding in python2 and python3 · 38310a5e
    Mingjian Lu 提交于
    In python2, binary type is native string type, so function b and nativestr should be the same. In python3, unicode is native string and binary is encoded unicode type. Now the question comes, why do we encode unicode string in python3 by encode('latin-1') instead using utf-8?
    38310a5e
compat.py 4.4 KB