You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by José Ferreiro <jo...@gmail.com> on 2008/11/12 17:34:27 UTC
Cyrillic characters.
Hello
I am providing data in cyrillic characters using Axis 1.x.
The tag in the SOAP response looks like:
<Item>Основное
</codeDescription></errorCodeItem></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...
Thank you!
--
José Ferreiro
MSc in Communication Systems, EPFL.
Re: Cyrillic characters.
Posted by Ognjen Blagojevic <og...@etf.bg.ac.rs>.
Try reading this:
http://forum.java.sun.com/thread.jspa?threadID=653068&tstart=165
Maybe the console font doesn't support cyrillic characters?
-Ognjen
José Ferreiro wrote:
> Thank you Ognjen.
> I tried this and I see you logic but it is not working!
> Well for me it is not the most important to see the data in the Output
> Console (well it will help but as far as I know that the data is
> transfered this is the most important).
>
> I am trying now to develop a GUI to see better what I may display or not...
>
> Thank you once again Ognjen!
>
>
> On Thu, Nov 13, 2008 at 4:57 PM, Ognjen Blagojevic <og...@etf.bg.ac.rs>
> wrote:
>
> As I am developping in a English (Western country) environment
> with eclipse I cannot display the word *Основное *from
> *Основное* in
> the Eclipse console (I mean when I do a System.out.println....).
>
>
> Just try this:
>
> Run, Open run dialog...
>
> then locate the class where the main method is, then select
> Arguments tab, and write
>
> -Dfile.encoding=UTF-8
>
> in VM arguments text field. Then, select Common tab, and for Console
> Encoding select "Other: UTF-8".
>
> After that, you should be able to see cyrillic characters on the
> console.
>
> -Ognjen
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> <ma...@ws.apache.org>
> For additional commands, e-mail: axis-user-help@ws.apache.org
> <ma...@ws.apache.org>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Cyrillic characters.
Posted by José Ferreiro <jo...@gmail.com>.
Thank you Ognjen.
I tried this and I see you logic but it is not working!
Well for me it is not the most important to see the data in the Output
Console (well it will help but as far as I know that the data is transfered
this is the most important).
I am trying now to develop a GUI to see better what I may display or not...
Thank you once again Ognjen!
On Thu, Nov 13, 2008 at 4:57 PM, Ognjen Blagojevic <og...@etf.bg.ac.rs>wrote:
> As I am developping in a English (Western country) environment with eclipse
>> I cannot display the word *Основное *from
>> *Основное* in the Eclipse
>> console (I mean when I do a System.out.println....).
>>
>
> Just try this:
>
> Run, Open run dialog...
>
> then locate the class where the main method is, then select Arguments tab,
> and write
>
> -Dfile.encoding=UTF-8
>
> in VM arguments text field. Then, select Common tab, and for Console
> Encoding select "Other: UTF-8".
>
> After that, you should be able to see cyrillic characters on the console.
>
> -Ognjen
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
Re: Cyrillic characters.
Posted by José Ferreiro <jo...@gmail.com>.
Martin,
I fully agree with you!
I will develop a GUI and I will see better those problems.
Thank you for your advice.
PS: The display from the received XML message works in the Browser. But
some problems arises when I apply WSS4J (encryption + signature) due to the
following error:
org.apache.xml.security.encryption.XMLEncryptionException: An invalid XML
character (Unicode: 0x1e) was found in the element content of the document.
Therefore I think I will escape XML of those characters:
Основное from the DB...
Thank you Martin.
.
2008/11/13 Martin Gainty <mg...@hotmail.com>
> the problem is accomodating input and display for cyrillic characters
> you should implement all of the features DB, AppServer as well as KB and
> Browser configurations on a separate machine
> so to maintain input (Keyboard) and display (browser)cleanly separated (and
> operational) for either latin or cyrillic
>
> Martin
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official
> business of Sender. This transmission is of a confidential nature and Sender
> does not endorse distribution to any party other than intended recipient.
> Sender does not necessarily endorse content contained within this
> transmission.
>
>
>
>
> > Date: Thu, 13 Nov 2008 16:57:57 +0100
> > From: ognjen@etf.bg.ac.rs
> > To: axis-user@ws.apache.org
> > Subject: Re: Cyrillic characters.
> >
> > > As I am developping in a English (Western country) environment with
> > > eclipse I cannot display the word *Основное *from
> > > *Основное* in the
> > > Eclipse console (I mean when I do a System.out.println....).
> >
> > Just try this:
> >
> > Run, Open run dialog...
> >
> > then locate the class where the main method is, then select Arguments
> > tab, and write
> >
> > -Dfile.encoding=UTF-8
> >
> > in VM arguments text field. Then, select Common tab, and for Console
> > Encoding select "Other: UTF-8".
> >
> > After that, you should be able to see cyrillic characters on the console.
> >
> > -Ognjen
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
>
> ------------------------------
> Stay up to date on your PC, the Web, and your mobile phone with Windows
> Live Click here <http://clk.atdmt.com/MRT/go/119462413/direct/01/>
>
--
José Ferreiro
MSc in Communication Systems, EPFL.
RE: Cyrillic characters.
Posted by Martin Gainty <mg...@hotmail.com>.
the problem is accomodating input and display for cyrillic characters
you should implement all of the features DB, AppServer as well as KB and Browser configurations on a separate machine
so to maintain input (Keyboard) and display (browser)cleanly separated (and operational) for either latin or cyrillic
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.
> Date: Thu, 13 Nov 2008 16:57:57 +0100
> From: ognjen@etf.bg.ac.rs
> To: axis-user@ws.apache.org
> Subject: Re: Cyrillic characters.
>
> > As I am developping in a English (Western country) environment with
> > eclipse I cannot display the word *Основное *from
> > *Основное* in the
> > Eclipse console (I mean when I do a System.out.println....).
>
> Just try this:
>
> Run, Open run dialog...
>
> then locate the class where the main method is, then select Arguments
> tab, and write
>
> -Dfile.encoding=UTF-8
>
> in VM arguments text field. Then, select Common tab, and for Console
> Encoding select "Other: UTF-8".
>
> After that, you should be able to see cyrillic characters on the console.
>
> -Ognjen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
_________________________________________________________________
Stay up to date on your PC, the Web, and your mobile phone with Windows Live
http://clk.atdmt.com/MRT/go/119462413/direct/01/
Re: Cyrillic characters.
Posted by Ognjen Blagojevic <og...@etf.bg.ac.rs>.
> As I am developping in a English (Western country) environment with
> eclipse I cannot display the word *Основное *from
> *Основное* in the
> Eclipse console (I mean when I do a System.out.println....).
Just try this:
Run, Open run dialog...
then locate the class where the main method is, then select Arguments
tab, and write
-Dfile.encoding=UTF-8
in VM arguments text field. Then, select Common tab, and for Console
Encoding select "Other: UTF-8".
After that, you should be able to see cyrillic characters on the console.
-Ognjen
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Cyrillic characters.
Posted by José Ferreiro <jo...@gmail.com>.
Thank you Ognjen,
You are correct about your statement.
I also suceeded without any problem to do the excaping for
</codeDescription> -> </codeDescription>
As I am developping in a English (Western country) environment with eclipse
I cannot display the word *Основное *from *
Основное* in the Eclipse
console (I mean when I do a System.out.println....).
This is due in my understanding because I am working with Latin encoding and
I should change my environment (of the Console output) to another encoding
thing that I do not want to do.
May I ask you which is your Environment setting in your machine (Russian
KOI)?
Thank you Ognjen.
Rgds,
/JF
On Thu, Nov 13, 2008 at 3:17 PM, Ognjen Blagojevic <og...@etf.bg.ac.rs>wrote:
> José Ferreiro wrote:
>
>> <Item>Основное
>> </codeDescription></errorCodeItem></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("Основное
>
> </codeDescription></errorCodeItem>"));
>
> 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
>
>
--
José Ferreiro
MSc in Communication Systems, EPFL.
"Think little goals and expect little achievements. Think big goals and win
big success." David Joseph Schwartz
Re: Cyrillic characters.
Posted by Ognjen Blagojevic <og...@etf.bg.ac.rs>.
José Ferreiro wrote:
> <Item>Основное
> </codeDescription></errorCodeItem></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("Основное
</codeDescription></errorCodeItem>"));
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