# XML get content encoding

**URL:** <https://forums.unrealengine.com/t/xml-get-content-encoding/403883>\
**Category:** UI\
**Tags:** text, unreal-engine, xml, question\
**Created:** [September 6, 2017, 12:32pm UTC](https://forums.unrealengine.com/t/xml-get-content-encoding/403883 "2017-09-06T12:32:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emixam](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Emixam](https://forums.unrealengine.com/u/Emixam)\
**Post date:** [September 6, 2017, 12:32pm UTC](https://forums.unrealengine.com/t/xml-get-content-encoding/403883/1 "2017-09-06T12:32:24Z")

</div>

Hello, I’ve written a xml writter/reader with the module XmlParser, but I have some trouble with the encoding.

Written the xml cause no problem, the “éèàô…” are written well in the file, but when getting them via GetContent() I get some weird letters.  
(e.g. for “é” I get something like “Ā©”)

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [September 6, 2017, 1:32pm UTC](https://forums.unrealengine.com/t/xml-get-content-encoding/403883/2 "2017-09-06T13:32:42Z")

</div>

Where do you getting those weird letters? because what you see is still valid unicode data but thing that you displaying in reading it wrong.

---

<div class="post-metadata">

**Author:** ![Emixam](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Emixam](https://forums.unrealengine.com/u/Emixam)\
**Post date:** [September 6, 2017, 1:45pm UTC](https://forums.unrealengine.com/t/xml-get-content-encoding/403883/3 "2017-09-06T13:45:52Z")

</div>

From the GetContent() (eg I have my FXmlNode “Title”, Title-\>GetContent() returns the weird letters)

I save the return value in a FString, but even “GEngine-\>AddOnScreenDebugMessage(-1, 15.0f, FColor::Yellow, MyNode-\>GetContent());” shows the weird letters

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [September 6, 2017, 3:19pm UTC](https://forums.unrealengine.com/t/xml-get-content-encoding/403883/4 "2017-09-06T15:19:51Z")

</div>

Ah indeed you need to convert type to make code acknolage the unicode encoding, there full docs about it:

> **[Character Encoding](https://docs.unrealengine.com/5.1/en-US/character-encoding-in-unreal-engine/)**
>
> Overview of character encodings used in Unreal Engine.

---

<div class="post-metadata">

**Author:** ![Emixam](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Emixam](https://forums.unrealengine.com/u/Emixam)\
**Post date:** [September 7, 2017, 7:01am UTC](https://forums.unrealengine.com/t/xml-get-content-encoding/403883/5 "2017-09-07T07:01:38Z")

</div>

Already read that, but did not fix it, I tried all the possible convertions, none worked (I got “??” instead of the accented letters for the utf8 conversion if I remember well)
