[Product-Developers] Why utf-8 characters in .pt files in fail?

Andreas Jung lists at zopyx.com
Thu Oct 30 18:37:06 UTC 2008


On 30.10.2008 15:28 Uhr, Andreas Jung wrote:
> On 30.10.2008 15:25 Uhr, Mikko Ohtamaa wrote:
>>
>>> *Trible* check that the encoding of your template is really utf-8. If it
>> isn't utf-8, you have to specify a different encoding within the
>> .metadata file of the related template (I think
>> [default]\ncharset=iso-8859-15 for example).
>>
>> Got it working, thanks! The problem is that my metadata filename
>> didn't have
>> a proper name (.metadata instead of .pt.metadata). Talk about DRY
>> principle... I finally noticed this by feeding garbage into .metadata.
>>
>> Another question: Why does not .pt default to utf-8? utf-8 is a bit like
>> standard nowadays, isn't it? :)
>
> UTF-8 is the default afaik or FS-based templates and usually should not
> require any further metadata files.

I was partly wrong. UTF-8 is the default for pagetemplates on the FS 
with content-type text/xml but iso-8859-15 for text/html. You are free 
to make the template an xhtml template with a related XML preamble or 
you define the encoding using <meta http-equiv...>...check 
FSPageTemplate.py if you are interested in implementation details.
Changing the default encoding to utf-8 isn't an option for backward 
compatibility.

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lists.vcf
Type: text/x-vcard
Size: 316 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20081030/88b831f5/attachment.vcf>


More information about the Product-Developers mailing list