[Zope-CMF] Re: .metadata files, latin-1 vs. unicode, and encoding errors

yuppie y.2006_ at wcm-solutions.de
Wed Sep 6 09:29:16 EDT 2006

Hi Jean-François!

Doyon, Jean-Francois wrote:
> +1
> Especially since the FSMetadata class isn't a mix-in so it turns out
> getting to the site instance's encoding isn't easy.
> Want me to file a bug?
> Florent Guillaume wrote at 2006-9-4 20:38 +0200:
>> I'd say it would be cleaner to let the .metadata specify its own 
>> encoding, for instance with a # coding: utf-8 at the top, and pasrse 
>> that in FSMetadata.
> I find this a good suggestions -- but would use the declaration syntax
> used also in (e.g.) Python.

I'm not sure I understand the plan. Encoding declarations usually 
describe the encoding of the file, not the encoding used inside the 

Does that mean all metadata will be converted to unicode? And methods 
that use the metadata - like tag() - will return unicode instead of str 

AFAICS a change like that requires many unit tests that make sure 
unicode values don't cause any trouble and a migration strategy for code 
that expects str values.



More information about the Zope-CMF mailing list