r13350 - in Products.Archetypes/trunk: . Products/Archetypes
"Laurence Rowe" <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.archetypes.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: ldr
Date: Thu Dec 16 14:52:33 2010
New Revision: 13350
Modified:
Products.Archetypes/trunk/CHANGES.txt
Products.Archetypes/trunk/Products/Archetypes/Field.py
Log:
Handle getCharset() returning None in Field.encode/decode.
Modified: Products.Archetypes/trunk/CHANGES.txt
==============================================================================
--- Products.Archetypes/trunk/CHANGES.txt (original)
+++ Products.Archetypes/trunk/CHANGES.txt Thu Dec 16 14:52:33 2010
@@ -4,6 +4,9 @@
1.7 - Unreleased
----------------
+- Handle getCharset() returning None in Field.encode/decode.
+ [elro]
+
- Avoid various deprecation warnings under Zope 2.13.
[hannosch]
Modified: Products.Archetypes/trunk/Products/Archetypes/Field.py
==============================================================================
--- Products.Archetypes/trunk/Products/Archetypes/Field.py (original)
+++ Products.Archetypes/trunk/Products/Archetypes/Field.py Thu Dec 16 14:52:33 2010
@@ -128,6 +128,8 @@
# that occurs during object initialization
# (no acquisition wrapper)
encoding = 'UTF8'
+ if encoding is None:
+ encoding = 'UTF8'
value = value.encode(encoding)
return value
@@ -142,6 +144,8 @@
# that occurs during object initialization
# (no acquisition wrapper)
encoding = 'UTF8'
+ if encoding is None:
+ encoding = 'UTF8'
value = unicode(value, encoding)
return value
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d