Toss an afternoon, finally solved the problem, it is necessary to record, I wonder why the lab computer is not a problem, to the dorm is hanging off, hum
The main is to change the Mimetypes file, located under D:\MySoftware\Python27\Lib
1. Add code
"default_encoding = sys.getdefaultencoding ()" found in the mimetypes.py file
Add on top of the code
if ' Utf-8 ' : Reload (SYS) sys.setdefaultencoding ('utf-8')
2. Comment Code
About 248 lines in mimetypes.py, find the code and annotate it, as follows
defenum_types (mimedb): I=0 whileTrue:Try: CType=_winreg. EnumKey (Mimedb, i)exceptEnvironmentError: Break #Try: #CType = Ctype.encode (default_encoding) # Omit in 3.x! #except Unicodeencodeerror: #Pass #Else: yieldCType I+ = 1
And then, finally, I can write Python happily under the win8 under my little laptop.
"Fix" python2.x version of Django under Admin Administration page CSS is invalid