java.lang.String represents a sequence of characters, not bytes. So it has no particular encoding (at least, the way in which it is encoded is a secret known only to the Java VM).
When you use <xsl:value-of> to output a string, the encoding of the bytes in the serialized output is determined by the <xsl:output> declaration in the stylesheet.
Michael Kay
>
> From: porton@...
> Date: 2002/10/13 Sun PM 06:44:18 GMT
> To: saxon-help@...
> Subject: [saxon] UTF-8 and java.lang.String
>
> Hi, I'm a new subscriber.
>
> I have a Java function which returns a java.lang.String representing an UTF-8
> string.
>
> I need to output this string to a UTF-8 XML document. But when I try to do
> this (by xsl:value-of) I get a mess. Seemingly Saxon recodes encoding... How
> to accomplish this?.. Is it a bug of Saxon?
> --
> Victor Porton (porton@...)
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> saxon-help mailing list
> saxon-help@...
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>
|