users@jaxb.java.net

Re: UTF-8 encoding broken in JAXB 1.0 marshaller

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Thu, 06 Mar 2003 07:23:22 -0800

> For example the character "? (o with two dots above it) has the code 246
> decimal or 0xF6 in the ANSI codepage 1252 (Windows Latin 1)

I only see '?' where I should see "o with two dots above it"...

Anyway, I don't believe what you wrote is true. &#214; represents "Latin
Capital Letter O With Diaeresis", and this is true regardless of the
encoding of XML file or the default system encoding.

Is there any chance you accidentally placed capital O with two dots
instead of small o with two dots?

I agree that the writer shouldn't do the character entity escaping when
characters can be legally represented by the target encoding.

And to workaround this problem, you need to find your own XMLWriter.
Search the archive for XMLWriter for details.

regards,
--
Kohsuke KAWAGUCHI                  408-276-7063 (x17063)
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com