4 ms·
> and Python3 not operating on bytes by default is a mess. I'm not arguing that it's not, but I don't how your examples support your point. Would you please ex
by kbd 12y ago
> and Python3 not operating on bytes by default is a mess.
I'm not arguing that it's not, but I don't how your examples support your point. Would you please explain how your examples show that "strings are unicode" is broken on Python 3?
FWIW, here's what I get:
Python 2:
>>> import sys, locale
>>> print(sys.getdefaultencoding())
ascii
>>> print(locale.getpreferredencoding())
UTF-8
>>> print(sys.stdout.encoding)
UTF-8
>>> print(sys.getfilesystemencoding())
utf-8
In Python 3, the only difference is:
>>> print(sys.getdefaultencoding())
utf-8