axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ognjen Blagojevic <ogn...@etf.bg.ac.rs>
Subject Re: Cyrillic characters.
Date Thu, 13 Nov 2008 14:17:16 GMT
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: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message