[Zope-CMF] Re: [RFC] [Patch] GenericSetup and encodings

yuppie y.2006_ at wcm-solutions.de
Thu Jun 8 05:09:30 EDT 2006


Hi!


Yves Bastide wrote:
> yuppie wrote:
>> Yves Bastide wrote:
>>> yuppie wrote:
>>>>
> Here's a minimal patch for GenericSetup not to raise on the previous 
> case (Demonstration product. Not for sale.)
> 
> [...]
> 
> 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?

>>> Thanks for setting me right. What's the usefulness of getEncoding()? 
>>> As you say, exported files don't need to be other than utf-8 encoded.
>>
>> I guess it just exists for historical reasons.
> 
> Might it be removed, or default'ed to utf-8? Do people already rely on it?

Don't know if third party products use it. I guess if CPS doesn't nobody 
does.

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.


Cheers,

	Yuppie




More information about the Zope-CMF mailing list