Determining mime type of DTML output( was: Chinese Chars in Zope 2.0b1)
Atsuo Ishimoto wrote:
On Thu, 05 Aug 1999 13:31:24 +0300 Hannu Krosing <hannu@trust.ee> wrote:
You can set the mime-type using the RESPONSE object:
<!--#call "RESPONSE.setHeader('Content-type','text/html')-->
to override Zope-s default content-type determination.
Yes,,,,, but do I need to set the mime-type manually? all the page I write? I'm too lazy to do so ;)
I agree that anything starting with <HTML> or other tags should be served as text/html, if it is not, then it is can probably called a mistake. OTOH, if your DTML produces just text, it will be quite hard to see if it is valid text for some charset or just binary data, so i guess ZPublisher determines that by checking for some non-ascii chars in it. I suspect that ZPublisher does this test _before_ testing for HTML and thus fails for valid non-ansi html.
Writing this code in standard_html_header or such may better, but still dull and error-prone job.
As it is generally a good idea to set the character-set there anyway, I guess it is not too hard. ---------------- Hannu
participants (1)
-
Hannu Krosing