Andreas Reuleaux wrote:
Some time ago there has been a discussion on Zope3-Users list about specifying an encoding of the PageTemplateFile like this:

<browser:page
   template="tempalte.pt"
   encoding="utf-8"
   ...
/>

The encoding of a page template is an intrinsic property of the
template itself and not determined by its use.
This property should therefore not be specified in a configuration
file (there is just a single correct value which must not be "configured"
but kept fix).

OK, I can live with that. But then I want the possibility to
suppress the xml declaration when the page is sent to the
browser, because otherwise IE will go into quirks mode.

I've changed the default file encoding for HTML mode of PT's to UTF-8. (rev. 33316) I guess it's a good start for non 'ascii' developers (like me).

Fred pointed out that in HTML mode we can use <meta http-equiv="content-type"> for determining PT's input encoding.

And to conclude, we need the following:

- The code for guessing file input encoding in HTML mode based on the <meta> declaration. I can do it, but should the code be somewhere inside PageTemplateFile or inside HTMLTALParser?;
- Some options to suppress/change <?xml ?> and <meta> declarations;

Maybe we need to delay all this changes till Z3.2 (Z3.1.1)?

--
Dmitry Vasiliev (dima at hlabs.spb.ru)
    http://hlabs.spb.ru
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to