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

Andreas Jung lists at zopyx.com
Thu Oct 30 14:04:51 UTC 2008


On 30.10.2008 14:57 Uhr, Mikko Ohtamaa wrote:
> Why UTF-8 characters in TAL page templates are double encoded in UTF-8? Plone
> 3.1.x.
>
> <html xmlns="http://www.w3.org/1999/xhtml"
>        xmlns:metal="http://xml.zope.org/namespaces/metal"
>        xmlns:tal="http://xml.zope.org/namespaces/tal"
>        xmlns:i18n="http://xml.zope.org/namespaces/i18n"
>        metal:use-macro="context/main_template/macros/master">
>
> <body>
> 	
> 	<metal:slot metal:fill-slot="main">
> 		<p>
> 			Sisältö on lähetetty eteenpäin toimittajakunnalle oikoluettavaksi.
> 		</p>
> 	</metal:slot>
> </body>
> </html>
>

> will result to web page text:
>
>   SisÀltö on lÀhetetty eteenpÀin toimittajakunnalle oikoluettavaksi.
>
> Content-type: is text/html; charset=utf-8
>
> Someone on #zope suggested that this might a Plone specific problem.


*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).

-aj


-- 
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: info at zopyx.com - Phone +49 - 7071 - 793376
Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK
------------------------------------------------------------------------
E-Publishing, Python, Zope & Plone development, Consulting

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


More information about the Product-Developers mailing list