Noha Nhe
Noha Nhe

Reputation: 235

Unicode string in XML

In xml unicode are represented as follows:

e.g:

\ue349 

What if I want to write a string consists of two chars with unicodes e343 e312

How can this be represented in XML?

Upvotes: 16

Views: 43825

Answers (2)

Jukka K. Korpela
Jukka K. Korpela

Reputation: 201538

XML does not use \ue349 notation. Character references, starting with &#, may be used, but they are mostly not needed. XML is usually used with UTF-8 character encoding, so that each character can be written as such. (When generating XML in a program, you might well use a notation like \ue349 if supported by the programming language.)

In Unicode, the numbers E343 and E312 refer to Private Use codepoints, to which no character is assigned by the standard. They may be used by private agreements as desired, but you should not expect any software or any person to understand them, except by such agreements. With this in mind, the code points U+E343 U+E312 (and hence the characters they may denote by some agreement) can be written as .

Upvotes: 28

Esailija
Esailija

Reputation: 140210

<node>&#xE343;&#xE312;</node>

Upvotes: 16

Related Questions