cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Heiden <martin.hei...@netcologne.de>
Subject Re: Cocoon, JX Temaplte and UTF-8
Date Wed, 27 Feb 2008 20:21:09 GMT
Hi!

Wednesday, February 27, 2008, 5:20:28 PM, you wrote:

MHA> I want to pass the content of that Model (what comes out of the write())
MHA> to the pipeline and display it in a template, jx.xml, using <jx:out
MHA> value="#{result-list}" xmlize="true"
MHA> xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"/>.


MHA> "org.xml.sax.SAXParseException: Invalid byte 2 of 3-byte UTF-8 sequence"
MHA> when using ByteArrayOutPutStream.toString()


MHA> It's vital that the UTF-8 encoding is kept, and Java String doesn't
MHA> support that.

AFAIK Java Strings are UTF-8 too. If you deal with different
character sets, you've got to convert the data when constructing or
outputting a string. Java assumes the platform standard encoding, if
you don't specify another one.

Did you try:

byteArrayOutputStream.toString("UTF-8")?

regards,

  Martin


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


Mime
View raw message