[Zope-CMF] Re: [RFC] [Patch] GenericSetup and encodings
Yves Bastide
ybastide at wanadoo.fr
Thu Jun 8 05:47:28 EDT 2006
yuppie wrote:
> Hi!
>
[...]
>> With this applied, Portàl (u'Port\xe0l'), which becomes
>> 'Port\xc3\xa0l', is displayed as Portà l ... Zope does input--output
>> properties in utf-8, but stores them in iso8859. Sigh.
>
> I was afraid this would be complex :(
> That's why I only use ASCII in configuration data.
>
> Can you find out why it stores them in iso8859? Is this hardcoded or
> configurable somewhere?
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 ...
[About getEncoding()]
>
> Don't know if third party products use it. I guess if CPS doesn't nobody
> does.
It does, though I suspect incorrectly. Florent?
>
> AFAICS it could be deprecated at least for export contexts.
>
>>>> Well, I think I can wriggle out of most of my problems using
>>>> translation. And I'll try and write UTF-8 unit tests if nobody beats
>>>> me to it.
>>>
>>> That would be great.
>>
>> Hmm, by adding to an existing test suite, or creating a new one?
>
> In general the unit tests have a module / class structure similar to the
> tested units. E.g. tests for utils.PropertyManagerHelpers should be
> added to test_utils.PropertyManagerHelpersTests. But sometimes there are
> reasons to add a new test suite, e.g. if you need a different setup.
I did modify test_utils's properties suite (see attached patch), but it
passes with GenericSetup current version :-)
>
>
> Cheers,
>
> Yuppie
yves
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gs-test.diff
Type: text/x-patch
Size: 3659 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-cmf/attachments/20060608/f418381c/gs-test.bin
More information about the Zope-CMF
mailing list