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