forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Brondsema <d...@brondsema.net>
Subject Re: Encoding of HTML files
Date Sun, 02 May 2004 23:38:06 GMT
On Sun, 2 May 2004, Fabrice Bacchella wrote:

> By default, HTML files are encoded in ISO-8859-1 because of the way the
> Cocoon's HTML serialiser is declared in sitemap.xmap :
>
> <map:serializer name="html" mime-type="text/html"
> src="org.apache.cocoon.serialization.HTMLSerializer">
> 	<doctype-public>-//W3C//DTD HTML 4.01 Transitional//EN</doctype-public>
>
> <doctype-system>http://www.w3.org/TR/html4/loose.dtd</doctype-system>
> </map:serializer>
>
> The default one is such a case is ISO-8859-1. And it even add a META in
> the HTML result. But here in French, ISO-8859-15 is better because of
> the   e dans l'o  character : . In Russian or Asia, the situation is
> even worse.
>
> Is that possible to add a properties in forrest.properties saying for
> example :
> project.encoding=UTF-8
>
> and adding a <encoding>@project.encoding@</encoding> element in the
> HTML serializer ?
>
> And in a more general way, where can I find a document about the way
> properties are used by forrest ? Which files use them ? How to add a
> new one ?
>

Sounds like a good idea.  First, though, there is a 'copyless' branch that
you
probably want to use when testing your changes because you don't have to
rebuild forrest each time you make a change.  See
http://nagoya.apache.org/eyebrowse/ReadMsg?listId=65&msgNo=10781 for
details on how to get it and use it.

To answer your question, forrest.properties is loaded by
src/core/forrest.build.xml Disclaimer: the rest of this paragraph I just
learned right now because I didn't know the answer and was interested :-)
So somebody correct me if I'm wrong.
src/core/context/WEB-INF/cocoon.xconf defines the project: and forrest:
input modules.  You will want to add encoding in the <values> section of
the project input module and then in src/core/context/sitemap.xmap you can
use {project:encoding} when the HTML serializer is set up.


-- 
Dave Brondsema : dave@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
http://csx.calvin.edu : student org

Mime
View raw message