Strange string in XML element

Discussion in 'Ruby' started by Nikolay Pavlov, Sep 12, 2007.

  1. 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>Неверная
    подпись 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. <<<-----------------------------------
    ======================================================================
    Nikolay Pavlov, Sep 12, 2007
    #1
    1. Advertising

  2. 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>Неверная
    > подпись 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 -> ÐÐµÐ²ÐµÑ€Ð½Ð°Ñ > подпиÑÑŒ
    Marcin Raczkowski, Sep 12, 2007
    #2
    1. Advertising

  3. Nikolay Pavlov

    Guest

    > 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
    , Sep 12, 2007
    #3
  4. 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. <<<-----------------------------------
    ======================================================================
    Nikolay Pavlov, Sep 12, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jkflens
    Replies:
    2
    Views:
    1,449
    jkflens
    May 30, 2006
  2. tankbattle
    Replies:
    1
    Views:
    781
    George Bina
    Jul 21, 2006
  3. HANM
    Replies:
    2
    Views:
    698
    Joseph Kesselman
    Jan 29, 2008
  4. Kee Nethery
    Replies:
    12
    Views:
    2,051
    Stefan Behnel
    Jun 27, 2009
  5. Erik Wasser
    Replies:
    5
    Views:
    437
    Peter J. Holzer
    Mar 5, 2006
Loading...

Share This Page