# Strange string in XML element

**URL:** <https://www.ruby-forum.com/t/strange-string-in-xml-element/114452>\
**Category:** Ruby\
**Created:** [September 12, 2007, 8:44pm UTC](https://www.ruby-forum.com/t/strange-string-in-xml-element/114452 "2007-09-12T20:44:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikolay\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f9ae1b/32.png) [@Nikolay\_P](https://www.ruby-forum.com/u/Nikolay_P)\
**Post date:** [September 12, 2007, 8:44pm UTC](https://www.ruby-forum.com/t/strange-string-in-xml-element/114452/1 "2007-09-12T20:44:59Z")

</div>

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

\<?xml version=\"1.0\"?\> 118962105580 -5 Неверная подпись step=7

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

---

<div class="post-metadata">

**Author:** ![Nikolay\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f9ae1b/32.png) [@Nikolay\_P](https://www.ruby-forum.com/u/Nikolay_P)\
**Post date:** [September 12, 2007, 8:53pm UTC](https://www.ruby-forum.com/t/strange-string-in-xml-element/114452/2 "2007-09-12T20:53:00Z")

</div>

Nikolay P. wrote:

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

it’s string of html encoded characters -\> ÐÐµÐ²ÐµÑ€Ð½Ð°Ñ \> Ð¿Ð¾Ð´Ð¿Ð¸ÑÑŒ

---

<div class="post-metadata">

**Author:** ![Nikolay\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f9ae1b/32.png) [@Nikolay\_P](https://www.ruby-forum.com/u/Nikolay_P)\
**Post date:** [September 12, 2007, 9:02pm UTC](https://www.ruby-forum.com/t/strange-string-in-xml-element/114452/3 "2007-09-12T21:02:05Z")

</div>

> Did some one know what the hell is in 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

---

<div class="post-metadata">

**Author:** ![Nikolay\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f9ae1b/32.png) [@Nikolay\_P](https://www.ruby-forum.com/u/Nikolay_P)\
**Post date:** [September 12, 2007, 9:23pm UTC](https://www.ruby-forum.com/t/strange-string-in-xml-element/114452/4 "2007-09-12T21:23:11Z")

</div>

On Wednesday 12 September 2007 21:43:33 Nikolay P. wrote:

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

Responding to my own question… The answer was $KCODE = “UTF-8” 🙂
