[Zope-CMF] Re: [RFC] [Patch] GenericSetup and encodings
Yves Bastide
ybastide at wanadoo.fr
Thu Jun 8 06:14:08 EDT 2006
Replying to myself...
Yves Bastide wrote:
>
> I know of at least one point, ZPublisher.Converters (field2string).
> However by the time a supposedly unicode string (say title:UTF-8:string)
> comes here, it's already iso8859. Will look deeper ...
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 ...
yves
More information about the Zope-CMF
mailing list