José Ferreiro wrote:
<Item>&#x41E;&#x441;&#x43D;&#x43E;&#x432;&#x43D;&#x43E;&#x435; &lt;/codeDescription&gt;&lt;/errorCodeItem&gt;</Item>

Does anyone has an idea how I can get the encoded word/phrase back to cyrillic in the client?
I assume that it is UTF-8 encoded...

Actually, this is XML encoding. You can use apache commons class
StringEscapeUtils[1] to work with it.

For the given string,

System.out.println(StringEscapeUtils.unescapeXml("&#x41E;&#x441;&#x43D;&#x43E;&#x432;&#x43D;&#x43E;&#x435;
&lt;/codeDescription&gt;&lt;/errorCodeItem&gt;"));

prints

   Основное </codeDescription></errorCodeItem>

(Osnovnoe in cyrillic).


-Ognjen

[1]
http://commons.apache.org/lang/api-release/org/apache/commons/lang/StringEscapeUtils.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to