forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <>
Subject Re: why is forrest xml output not utf-8
Date Wed, 01 Feb 2006 00:05:50 GMT
El mar, 31-01-2006 a las 20:39 +0000, Ross Gardler escribió:
> David Crossley wrote:
> > I don't know much about encodings, but why are the documents output
> > by our xml serializer as ISO-8859-1 rather than UTF-8?
> I'm confused, I thought we were outputing UTF-8, certainly recent 
> messages on the user list say we are.

Forrest is using UTF-8 in both skins and the dispatcher as *HTML*

<map:serializer name="html" mime-type="text/html"
 <doctype-public>-//W3C//DTD HTML 4.01 Transitional//EN</doctype-public>

<map:serializer logger="sitemap.serializer.xhtml" mime-type="text/html" 
 name="xhtml" pool-grow="2" pool-max="64" pool-min="2" 
 <doctype-public> -//W3C//DTD XHTML 1.0 Strict//EN </doctype-public>

David did not ask for this format (html, on which the user threads are
about) but for *xml*.

in main/webapp/sitemap.xmap you find:
<map:serializer name="xml" mime-type="text/xml"

Unlike the other examples I gave this one do not have set any encoding.
> >
"The XML Serializer accepts following configuration parameters. These
configurations are not Xalan specific.

Name - Xalan Default Value
encoding - none

Looking on http://localhost:8888/index.xml I find 
<?xml version="1.0" encoding="UTF-8"?>

We state in our FAQ for the question: Does Forrest handle accents for
non-English languages?
"This is because sources for Forrest docs are XML documents, which can
include any of these, provided the encoding declared by the XML doc
matches the actual encoding used in the file."

David, why do you think we would use ISO-8859-1 for xml?

Is it because of:
<map:serializer name="links"
gives the answer for this:
"...HTML, on the other hand, allows the entire range of the ISO-8859-1
(ISO-Latin) character set to be used in documents..."

Doing a grep on forrest-trunk brings some hits on ISO-8859-1. Some of
them like the i18n stuff are needed for german, french, spanish, ...
The cap.xml is the only file that declared to need ISO-8859-1 as well.
Some xsl have as well use this ISO.

Anyway IMO the answer to the subject of this thread is, that forrest
*is* using UTF-8 on xml documents that is using this encoding.


"Together we stand, divided we fall!" 
Hey you (Pink Floyd)

View raw message