[Zope-Checkins] CVS: Packages/Zope/Startup - datatypes.py:1.6.2.9 zopeschema.xml:1.7.2.19

Jens Vagelpohl jens at dataflake.org
Sun Oct 9 19:54:28 EDT 2005


Update of /cvs-repository/Packages/Zope/Startup
In directory cvs.zope.org:/tmp/cvs-serv28362/lib/python/Zope/Startup

Modified Files:
      Tag: Zope-2_7-branch
	datatypes.py zopeschema.xml 
Log Message:
- backporting Chris Withers' changes for Collector #1490: Added a new 
  zope.conf option to control the character set used to encode unicode 
  data that reaches ZPublisher without any specified encoding.


=== Packages/Zope/Startup/datatypes.py 1.6.2.8 => 1.6.2.9 ===
--- Packages/Zope/Startup/datatypes.py:1.6.2.8	Fri Apr 29 06:29:09 2005
+++ Packages/Zope/Startup/datatypes.py	Sun Oct  9 19:53:57 2005
@@ -223,3 +223,14 @@
                 return (real_root, real_path, container_class)
         raise LookupError('Nothing known about mount path %s' % mount_path)
     
+def default_zpublisher_encoding(value):
+    # This is a bit clunky but necessary :-(
+    # These modules are imported during the configuration process
+    # so a module-level call to getConfiguration in any of them
+    # results in getting config data structure without the necessary
+    # value in it.
+    from ZPublisher import Converters, HTTPRequest, HTTPResponse
+    Converters.default_encoding = value
+    HTTPRequest.default_encoding = value
+    HTTPResponse.default_encoding = value
+


=== Packages/Zope/Startup/zopeschema.xml 1.7.2.18 => 1.7.2.19 ===
--- Packages/Zope/Startup/zopeschema.xml:1.7.2.18	Wed Dec  1 18:01:48 2004
+++ Packages/Zope/Startup/zopeschema.xml	Sun Oct  9 19:53:57 2005
@@ -773,5 +773,12 @@
 
   <section type="zoperunner" name="*" attribute="runner"/>
 
+  <key name="default-zpublisher-encoding" datatype=".default_zpublisher_encoding">
+     <description>
+       This key controls what character set is used to encode unicode
+       data that reaches ZPublisher without any other specified encoding.
+     </description>
+     <metadefault>iso-8859-15</metadefault>
+  </key>
 
 </schema>



More information about the Zope-Checkins mailing list