You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by "Peter Maher (POZ Ltd)" <pe...@poz.co.im> on 2008/06/19 15:27:09 UTC

Chinese characters in source object is emitted as ? Characters in XML

Is there a problem with JaxMe and Chinese characters?  

I am setting my source object property (which is a String) to the following "Documentary evidence (���f���ļ�)" 
Storing the Chinese in a file and editing with a Hex editor shows that the bit in brackets reads E6 AD A4 E8 AA AA E6 98 8E E6 96 87 E4 BB B6

But when I marshal my object to XML I get "Documentary evidence (?????)"
In hex the bit in brackets is 3F 3F 3F 3F 3F

Any ideas about this?

Thanks

Pete.


RE: Chinese characters in source object is emitted as ? Characters in XML

Posted by "Peter Maher (POZ Ltd)" <pe...@poz.co.im>.
Yes - You're right - I've just found where I went wrong.  Basically configuration of my IDE for UTF-8 was my problem.

Thanks. 
Peter.

-----Original Message-----
From: Jochen Wiedmann [mailto:jochen.wiedmann@gmail.com] 
Sent: 19 June 2008 15:16
To: Peter Maher (POZ Ltd)
Cc: jaxme-dev@ws.apache.org
Subject: Re: Chinese characters in source object is emitted as ? Characters in XML

2008/6/19 Peter Maher (POZ Ltd) <pe...@poz.co.im>:

> Is there a problem with JaxMe and Chinese characters?

The answer is almost certainly "No". It is much more likely, that there is an error in your handling.,


> I am setting my source object property (which is a String) to the 
> following "Documentary evidence (���f���ļ�)"
> Storing the Chinese in a file and editing with a Hex editor shows that 
> the bit in brackets reads E6 AD A4 E8 AA AA E6 98 8E E6 96 87 E4 BB B6
>
> But when I marshal my object to XML I get "Documentary evidence (?????)"
> In hex the bit in brackets is 3F 3F 3F 3F 3F

I agree, that the question marks don't look good. However, the reason is most possibly a problem in the way you are reading and/or writing the XML file. You do not supply code, so I am unable to guess.

Jochen



--
Look, that's why there's rules, understand? So that you think before you break 'em.

 -- (Terry Pratchett, Thief of Time)

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: Chinese characters in source object is emitted as ? Characters in XML

Posted by Jochen Wiedmann <jo...@gmail.com>.
2008/6/19 Peter Maher (POZ Ltd) <pe...@poz.co.im>:

> Is there a problem with JaxMe and Chinese characters?

The answer is almost certainly "No". It is much more likely, that
there is an error in your handling.,


> I am setting my source object property (which is a String) to the following
> "Documentary evidence (���f���ļ�)"
> Storing the Chinese in a file and editing with a Hex editor shows that the
> bit in brackets reads E6 AD A4 E8 AA AA E6 98 8E E6 96 87 E4 BB B6
>
> But when I marshal my object to XML I get "Documentary evidence (?????)"
> In hex the bit in brackets is 3F 3F 3F 3F 3F

I agree, that the question marks don't look good. However, the reason
is most possibly a problem in the way you are reading and/or writing
the XML file. You do not supply code, so I am unable to guess.

Jochen



-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

 -- (Terry Pratchett, Thief of Time)