[Zope-dev] Strange Characters and Zope

Scott Robertson sroberts@codeit.com
Fri, 30 Jul 1999 11:27:27 -0700 (PDT)


On Fri, 30 Jul 1999, Robin Becker wrote:

> I was demonstrating the implementation in Zope of my Generational
> Accounting web model. The Academic saw how marvellous it was and wanted
> immediately to change some of the text in the pages. It was in word so I
> said 'save as html' and then we'll hack it into the database pages.
> Foolish me. Word inserts many strange characters into it's version of
> HTML. One of them being ’ character 0x92. This causes the page to start
> flinging out save as dialogs.
> 
> Can someone enlighten me as to what characters may be safely
> embedded/used in Zope DTML. We figured 0x92 fairly easily. The next
> document had something else weird and I haven't yet found out what.

Hi Robin,

If you put this at the top of the DTML Method/Document it should fix your
problem. 

Content-type: text/html


Make sure that that line is the first line and it has at least one blank
line before the the rest of the document content.

What is happening is that Zope tries to determine the HTML headers for you
and it detects the strange MicroSoft cruft and decides that it's a binary
file. Zope well see the line above and use that as the header for your
document instead of trying to guess it for you.

---------------------------------------------------
- Scott Robertson             Phone: 714.972.2299 -
- CodeIt Computing            Fax:   714.972.2399 -
-                http://codeit.com                -
---------------------------------------------------