當本身的web程序運行起來後,窗口會輸出每次的請求信息,可是中文會顯示亂碼 web
由於默認是顯示utf-8字符,中文顯示亂碼markdown
修改Python安裝目錄/Lib/site-packages/web/httpserver.py
最後兩句post
msg = self.format % (host, time, protocol, method, req, status) print >> outfile, utils.safestr(msg) 改爲 msg = self.format % (host, time, protocol, method, req.encode("gb2312"), status) print >> outfile, utils.safestr(msg)