--On 22. Juli 2006 16:17:09 +0200 Tino Wildenhain <[EMAIL PROTECTED]> wrote:
huh?..even on the file system a pt file is encoded using some encoding.
For an XML pagetemplate file the encoding is clearly defined through
the BOM (if available) and/or the XML preamble. So the most reliable
solution would be to use XML PTs only.

Yes but you have to explicitely store that information "somehow" in the
file - zope objects can use other methods to transfer encoding information
while they create the internal representation.
meta-tags for charset are quite ugly but you basically have no other
choice with filesystem stuff.
Problem here if the various encoding notifications collide (XML header
vs. XHTML meta-tag vs. BOM) so better have as few as possible - even
better none when

I am only talking of XML. And the encoding is clearly and unambiguously defined through the BOM (if available) and the XML preamble. So any application reading an XML file is able to detect the encoding and produce a unicode string from the file. According to a discussion with Dieter the Python XML parsers don't deal with the BOM and leave it up to the application to interpret the BOM correctly.

-aj 

Attachment: pgpHsujepZPLt.pgp
Description: PGP signature

_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to