users@jaxb.java.net

Re: Can't use swedish characters

From: Jukka Uusisalo <jukka.uusisalo_at_VTOY.FI>
Date: Sun, 12 Jan 2003 15:20:59 -0700

On Thu, 26 Dec 2002 11:53:26 -0700, Claes Hammer <hammer_at_SKIP.INFORMATIK.GU.SE> wrote:

>Hi
>
>I get
>java.io.UTFDataFormatException: Invalid byte 2 of 3-byte UTF-8 sequence ...
>when I use swedish characters as ?, ?, ?. Can anyone shed some light over this.

Tj?nare Claes,

I made some quick testcases, because these finnish :) characters causes
sometimes lot of work.

Marshalling element content '???' produces '&#228;&#246;&#229;'
and unmarshalling that produces correct data to back objects.
I think that works just fine.

Also i think if you are able to use iso-8859-1 encoding in your
xml-data, you can unmarshall those characters as we know them. :)
But probably causes some problems if transfer data between different
platforms.

- Jukka -