|Re: character entity in the input model gets substituted in the generated file even if it's xml/xhtm [message #55742 is a reply to message #55714]
||Mon, 19 January 2009 20:44
| Paul Elder
Registered: July 2009
Here's what's happening...
1) On reading the ® entity, the XML parser translates this into the
corresponding unicode character.
2) your c:get tag writest that Unicode character to the JET writer
3) when ws:file actually saves the contents, it tries to figure out what
encoding to use. Up until very, very recently, if no encoding was specfied,
JET would ask the platform/workspace what encoding to use. About a week ago,
I added a check with the content type manager, to see if the platform had a
registered content type that could figure out an encoding. You are
generating XHTML, which has several content-based methods of specifying
encoding. But, the content type that understand this are only available in
webtools, not the base platform. So, unless you have Webtools installed, JET
is still falling back to the platform's default encoding, which, as you are
finding, is different on linux and windows.
The easiest way to get things to happen the way you want it to explicitly
specify the encoding on ws:file. I think your XHTML template is specifying
UTF-8, so add that as the value of the encoding attribute of ws:file as
"Edoardo Comar" <email@example.com> wrote in message
>I have one input model where some text node contains the character entity
> the generated files include xhtml files and javadoc comment which gets the
> text via <c:get select="...">
> but there the entity is replaced with its actual value which depends on
> the platform encoding
> the result is that text generated on linux has a nonprintacble char in
> windows and viceversa.
> how could we have that character entity output verbatim in the generated
> text ?
Powered by FUDForum
. Page generated in 0.02342 seconds