r175 - ZopeChinaPak/trunk

0 views
Skip to first unread message

czug-checkins

unread,
Nov 26, 2005, 10:07:41 PM11/26/05
to czug-c...@googlegroups.com
Author: panjy
Date: Sun Nov 27 10:52:51 2005
New Revision: 175

Modified:
ZopeChinaPak/trunk/HISTORY.txt
ZopeChinaPak/trunk/__init__.py
Log:
mbcs encoding aliases works now


Modified: ZopeChinaPak/trunk/HISTORY.txt
==============================================================================
--- ZopeChinaPak/trunk/HISTORY.txt (original)
+++ ZopeChinaPak/trunk/HISTORY.txt Sun Nov 27 10:52:51 2005
@@ -1,6 +1,7 @@
version 0.8.1

- added mkwinzeoinstance.py to support ZEO window service
+ - fixed bug: mbcs encoding aliases under windows works now

version 0.8


Modified: ZopeChinaPak/trunk/__init__.py
==============================================================================
--- ZopeChinaPak/trunk/__init__.py (original)
+++ ZopeChinaPak/trunk/__init__.py Sun Nov 27 10:52:51 2005
@@ -8,10 +8,14 @@

import os
if os.name == 'nt':
- from encodings.aliases import aliases
+ import encodings
for ec in ['gb2312', 'gbk', 'gb18030', 'big5']:
- if not aliases.has_key(ec):
- aliases.update({ec:'mbcs'})
+ if not encodings.aliases.aliases.has_key(ec):
+ encodings.aliases.aliases[ec] = 'mbcs'
+ # clear cache
+ if encodings._cache.has_key(ec):
+ del encodings._cache[ec]
+

import ZopePak
import StructuredTextPak
Reply all
Reply to author
Forward
0 new messages