# Windows text encoding

**URL:** <https://discourse.libcinder.org/t/windows-text-encoding/548>\
**Category:** Uncategorized\
**Created:** [February 6, 2017, 12:55am UTC](https://discourse.libcinder.org/t/windows-text-encoding/548 "2017-02-06T00:55:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hperigo](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/hperigo/32/409_2.png) [@hperigo](https://discourse.libcinder.org/u/hperigo)\
**Post date:** [February 6, 2017, 12:55am UTC](https://discourse.libcinder.org/t/windows-text-encoding/548/1 "2017-02-06T00:55:57Z")

</div>

Hi all,  
I’m currently using a text file to build some UI stuff in cinder and I’m having some problems with the string encoding settings in windows ( mac is fine )

Something like this:  
If the text file is saved with UTF-8 encoding, Cinder creates and displays the glyphs with no problem. But the c++ std::string part is wrong, the word “ÁUDIO” turns “ÃUDIO”, I cannot use it as a key in a std::map for example.

But if I save the file Western ISO 8859-1 ( Unicode ) the std::string is fine, but I get an Exception like the one bellow if I TextLayout::addCenteredLine()

 ![](https://canada1.discourse-cdn.com/flex030/uploads/libcinder/original/1X/2d766fd12e9cb8311975db70bc1bddfc8974e880.PNG)

Any ideas how to solve this?

thanks!

---

<div class="post-metadata">

**Author:** ![balachandran\_c](https://avatars.discourse-cdn.com/v4/letter/b/f17d59/32.png) [@balachandran\_c](https://discourse.libcinder.org/u/balachandran_c)\
**Post date:** [February 20, 2017, 6:55pm UTC](https://discourse.libcinder.org/t/windows-text-encoding/548/2 "2017-02-20T18:55:11Z")

</div>

> [@hperigo](#):
>
> the word “ÁUDIO” turns “ÃUDIO”, I cannot use it as a key in a std::map for example.

Hi,

Could you please explain why it cannot be used in an std::map? I can see the problem in presenting it as a human readable string.

Bala.
