[Zope-CMF] Re: [RFC] [Patch] GenericSetup and encodings
yuppie
y.2006_ at wcm-solutions.de
Thu Jun 8 07:54:21 EDT 2006
Yves Bastide wrote:
>
> Well, should have looked up in the call stack.
> ZPublisher.HTTPRequest.processInputs, lines 527sq (Zope trunk):
>
> 527: item = unicode(item,character_encoding)
> 528: if hasattr(converter,'convert_unicode'):
> 529: item = converter.convert_unicode(item)
> 530: else:
> 531: item = converter(item.encode(default_encoding))
>
> converter is field2string, default_encoding is
> ZPublisher.HTTPRequest.default_encoding = 'iso-8859-15' (not to mistake
> for ZPublisher.Converters.default_encoding = 'iso-8859-15').
>
> These default_encoding's are set by
> Zope2.Startup.datatypes.default_zpublisher_encoding (i.e. zope.conf's
> default-zpublisher-encoding directive).
>
> Of course, just setting default-zpublisher-encoding to utf-8 results in
> a garbled ZMI ...
So GenericSetup has to use ZPublisher.HTTPRequest.default_encoding as
well. Right?
If CMF is messing around with other encodings (like using the site's
default_charset for the portal titel) it has to override that.
If using utf-8 was the wrong approach your test_utils patch has to be
modified as well.
Cheers, Yuppie
More information about the Zope-CMF
mailing list