[Zope-Checkins] SVN: Zope/trunk/lib/python/ZPublisher/ 'latin1' -> 'iso-8859-15'

Andreas Jung andreas at andreas-jung.com
Mon Nov 8 01:50:45 EST 2004


Log message for revision 28389:
  'latin1' -> 'iso-8859-15'
  

Changed:
  U   Zope/trunk/lib/python/ZPublisher/Converters.py
  U   Zope/trunk/lib/python/ZPublisher/HTTPRequest.py
  U   Zope/trunk/lib/python/ZPublisher/HTTPResponse.py

-=-
Modified: Zope/trunk/lib/python/ZPublisher/Converters.py
===================================================================
--- Zope/trunk/lib/python/ZPublisher/Converters.py	2004-11-08 06:38:44 UTC (rev 28388)
+++ Zope/trunk/lib/python/ZPublisher/Converters.py	2004-11-08 06:50:44 UTC (rev 28389)
@@ -20,7 +20,7 @@
 def field2string(v):
     if hasattr(v,'read'): return v.read()
     elif isinstance(v,UnicodeType) :
-        return v.encode('latin1')
+        return v.encode('iso-8859-15')
     else:
         return str(v)
 

Modified: Zope/trunk/lib/python/ZPublisher/HTTPRequest.py
===================================================================
--- Zope/trunk/lib/python/ZPublisher/HTTPRequest.py	2004-11-08 06:38:44 UTC (rev 28388)
+++ Zope/trunk/lib/python/ZPublisher/HTTPRequest.py	2004-11-08 06:50:44 UTC (rev 28389)
@@ -522,7 +522,7 @@
                                 if hasattr(converter,'convert_unicode'):
                                     item = converter.convert_unicode(item)
                                 else:
-                                    item = converter(item.encode('latin1'))
+                                    item = converter(item.encode('iso-8859-15'))
                             else:
                                 item=converter(item)
 

Modified: Zope/trunk/lib/python/ZPublisher/HTTPResponse.py
===================================================================
--- Zope/trunk/lib/python/ZPublisher/HTTPResponse.py	2004-11-08 06:38:44 UTC (rev 28388)
+++ Zope/trunk/lib/python/ZPublisher/HTTPResponse.py	2004-11-08 06:50:44 UTC (rev 28389)
@@ -444,7 +444,7 @@
                 encoding = match.group(1)
                 return body.encode(encoding)
         # Use the default character encoding
-        return body.encode('latin1','replace')
+        return body.encode('iso-8859-15','replace')
 
     def setBase(self,base):
         """Set the base URL for the returned document.



More information about the Zope-Checkins mailing list