[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Strange string in XML element

Nikolay Pavlov

9/12/2007 6:44:00 PM

Hello all.
Probably the answer is known, but not for me :)
I have a XML response from the external source:

<?xml version=\"1.0\"?>
<response>
<reqn>118962105580</reqn>
<retval>-5</retval>
<retdesc>&#1053;&#1077;&#1074;&#1077;&#1088;&#1085;&#1072;&#1103;
&#1087;&#1086;&#1076;&#1087;&#1080;&#1089;&#1100; step=7</retdesc>
</response>

Did some one know what the hell is in <retdesc> element and how to convert
it to normal text?

--
======================================================================
- Best regards, Nikolay Pavlov. <<<-----------------------------------
======================================================================


3 Answers

Marcin Raczkowski

9/12/2007 6:52:00 PM

0

Nikolay Pavlov wrote:
> Hello all.
> Probably the answer is known, but not for me :)
> I have a XML response from the external source:
>
> <?xml version=\"1.0\"?>
> <response>
> <reqn>118962105580</reqn>
> <retval>-5</retval>
> <retdesc>&#1053;&#1077;&#1074;&#1077;&#1088;&#1085;&#1072;&#1103;
> &#1087;&#1086;&#1076;&#1087;&#1080;&#1089;&#1100; step=7</retdesc>
> </response>
>
> Did some one know what the hell is in <retdesc> element and how to convert
> it to normal text?
>

it's string of html encoded characters -> НевеÑ?ная > подписÑ?

babycode

9/12/2007 6:58:00 PM

0

> Did some one know what the hell is in <retdesc> element and how to convert
> it to normal text?

Some kind of description containing HTML entities. I pasted the code
in a Blogger post and got back an expression in Russian (I think).

Greetings.
bc

Nikolay Pavlov

9/12/2007 7:22:00 PM

0

On Wednesday 12 September 2007 21:43:33 Nikolay Pavlov wrote:
> Did some one know what the hell is in <retdesc> element and how to
> convert it to normal text?

Responding to my own question... The answer was $KCODE = "UTF-8" :)

--
======================================================================
- Best regards, Nikolay Pavlov. <<<-----------------------------------
======================================================================