PageRenderTime 19ms CodeModel.GetById 16ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/xbaydnsweb/patch/encoding.patch

http://xbaydns.googlecode.com/
Patch | 12 lines | 11 code | 1 blank | 0 comment | 0 complexity | fd58af1115aaa569680b1a6c32a230f7 MD5 | raw file
 1Index: django/utils/encoding.py
 2===================================================================
 3--- django/utils/encoding.py	(版本 7519)
 4+++ django/utils/encoding.py	(工作副本)
 5@@ -43,6 +43,7 @@
 6 
 7     If strings_only is True, don't convert (some) non-string-like objects.
 8     """
 9+    if encoding=='X-MAC-SIMP-CHINESE':encoding='utf-8'
10     if strings_only and isinstance(s, (types.NoneType, int, long, datetime.datetime, datetime.date, datetime.time, float)):
11         return s
12     try: