Created
November 9, 2011 08:39
-
-
Save shimizukawa/1350858 to your computer and use it in GitHub Desktop.
virtualenvでsys.stdout.encodingが狂う
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
None | |
cp932 | |
今日は |
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
'ascii' | |
cp932 |
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
'cp932' | |
cp932 | |
今日は |
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
# -*- coding: utf-8 -*- | |
import sys, locale | |
print(repr(sys.stdout.encoding)) | |
print((locale.getpreferredencoding())) | |
print('今日は') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment