Mate,
I am not totally sure but...
Technique:
I read the XML Source to a String (to add to the textarea widget) like
this:
var string = org.apache.avalon.excalibur.io.IOUtil.toString(
new java.io.BufferedInputStream(
org.apache.cocoon.components.source.SourceUtil.getInputSource(
resolver.resolveURI(uri)
).getByteStream()
)
);
if you create a String from a byte stream, array or
whatever is byte-based don't you have to specify the
charset? AFAIK creating a String from a byte array
uses the platform default charset.
form.lookupWidget("xhtml").setValue(string);
did you check whether the string looks fine here?
...just what came up to my mind right away
HTH
cheers
--
Torsten