Created
January 1, 2013 07:57
-
-
Save friskfly/4425818 to your computer and use it in GitHub Desktop.
python 获取系统默认编码
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
import locale | |
import codecs | |
print locale.getpreferredencoding(); | |
print codecs.lookup(locale.getpreferredencoding()).name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment