cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Painter-Wakefield <paint...@mc.duke.edu>
Subject Re: [once again] best way to set http header encoding
Date Mon, 16 Feb 2004 22:48:43 GMT
there may be no "best way".  You can probably fix this issue at several 
different levels; Cocoon; Tomcat; Apache (if using it), etc.  In Cocoon, 
the easiest would probably be an Action.  It can be dirt simple.  If you 
want to use an xsp-action, it could be something like this:

<xsp:page        xmlns:xsp="http://apache.org/xsp"
                xmlns:action="http://apache.org/cocoon/action/1.0">
        <page>
                <xsp:logic>
                        response.setHeader("Content-Type", "text/html; 
charset=UTF-8");
                </xsp:logic>
        </page>
</xsp:page>

sitemap entry (put in the pipeline for each matcher you want to set the 
encoding for):
        <map:act type="serverpages" src="path-to-action.xml">

It could work.

-Christopher





Stefan Burkard <sburkard@previon.ch>
Sent by: news <news@sea.gmane.org>
02/16/2004 05:20 PM
Please respond to users

 
        To:     users@cocoon.apache.org
        cc: 
        Subject:        [once again] best way to set http header encoding


[SORRY, ONCE AGAIN MY QUESTION, BECAUSE THERE WAS NO ANSWER]

hi there

i wonder that cocoons serializer just writes a meta-tag with the 
encoding in the html-page. it doesn't do this in the http-header.

therefore apache set the http-header to his standard-encoding and 
"destroys" the correct encoding of the response, because most browsers 
ignore the meta-tag if the http-header-encoding is set.

so i need to set the http-header-encoding with cocoon and ask you all, 
whats the best way to do this. are there any actions, logicsheets or 
something else?

thanks and greetings
stefan



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org




Mime
View raw message