# UTF8 issue

**URL:** <https://forum.juce.com/t/utf8-issue/29573>\
**Category:** General JUCE discussion\
**Created:** [September 24, 2018, 10:30am UTC](https://forum.juce.com/t/utf8-issue/29573 "2018-09-24T10:30:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![otristan](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@otristan](https://forum.juce.com/u/otristan)\
**Post date:** [September 24, 2018, 10:30am UTC](https://forum.juce.com/t/utf8-issue/29573/1 "2018-09-24T10:30:51Z")

</div>

Hi Juce team,

I retrieve from the Windows registry a string that contains an XML text.  
This XML file uses UTF8 encoding given it’s header: \<?xml version="1.0" encoding="UTF-8"?\>

Unfortunately the string read from getStringAttribute of an XMLElement are not in UTF-8.

Does the XMLDocument ctor that uses a String check the actual document encoding ?

Thanks !

---

<div class="post-metadata">

**Author:** ![otristan](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@otristan](https://forum.juce.com/u/otristan)\
**Post date:** [September 24, 2018, 10:44am UTC](https://forum.juce.com/t/utf8-issue/29573/2 "2018-09-24T10:44:30Z")

</div>

From XMLDocument comments, it looks the default is UTF8 so the issue probably happen in juce::WindowsRegistry::getValue that do not handle UTF8 values ?

---

<div class="post-metadata">

**Author:** ![otristan](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@otristan](https://forum.juce.com/u/otristan)\
**Post date:** [September 24, 2018, 1:48pm UTC](https://forum.juce.com/t/utf8-issue/29573/3 "2018-09-24T13:48:10Z")

</div>

nevermind, the issue was that the value stored in the registry do not use wide char and was containing non ANSI char
