xml with special character, encoding utf-8

Posted by Sergio Morieca on Stack Overflow See other posts from Stack Overflow or by Sergio Morieca
Published on 2010-05-18T17:39:30Z Indexed on 2010/05/18 17:40 UTC
Read the original article Hit count: 366

Filed under:
|
|
|

I have a few simple questions, because I got confused reading all difference responses.

1) If I have an xml with prolog: and I'm going to unmarshall it with Java (for example: JaXB). I suppose, that I can't put CROSS OF LORRAINE (http://www.fileformat.info/info/unicode/char/2628/index.htm) inside, but I can put "\u2628", correct?

2) I've also heard that UTF-8 doesn't contain it, but anything in Unicode can be saved with encoding UTF-8 (or UTF-16), and here is an example from this page:

UTF-8 (hex) 0xE2 0x98 0xA8 (e298a8)

Is my reasoning correct? Can I use this form and put it in the xml with utf-8 encoding?

© Stack Overflow or respective owner

Related posts about java

Related posts about Xml