# Displaying special characters (li ke Ã©)

**URL:** <https://www.ruby-forum.com/t/displaying-special-characters-li-ke-a/125250>\
**Category:** wxRuby\
**Created:** [January 7, 2008, 2:53pm UTC](https://www.ruby-forum.com/t/displaying-special-characters-li-ke-a/125250 "2008-01-07T14:53:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Doorduin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/838e76/32.png) [@Daniel\_Doorduin](https://www.ruby-forum.com/u/Daniel_Doorduin)\
**Post date:** [January 7, 2008, 2:53pm UTC](https://www.ruby-forum.com/t/displaying-special-characters-li-ke-a/125250/1 "2008-01-07T14:53:36Z")

</div>

Hi wx guru’s,

When I want to display strings with special characters like Ã© (e + /) in  
a  
wxRuby gui element, only an empty string is displayed. Not only the  
‘special’ characters are hidden but all characters!  
I am using wxRuby on windows XP. It doesn’t matter if I include the  
special  
characters directly in the Ruby source code, or read them from an  
external  
file (with IO.open).

If you have any suggestions how to fix this problem, it would be greatly  
appreciated!

Kind regard,

DaniÃ«l

---

<div class="post-metadata">

**Author:** ![Daniel\_Doorduin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/838e76/32.png) [@Daniel\_Doorduin](https://www.ruby-forum.com/u/Daniel_Doorduin)\
**Post date:** [January 7, 2008, 3:31pm UTC](https://www.ruby-forum.com/t/displaying-special-characters-li-ke-a/125250/2 "2008-01-07T15:31:13Z")

</div>

Hi Daniel

Daniel Doorduin wrote:

> When I want to display strings with special characters like é (e + /)  
> in a wxRuby gui element, only an empty string is displayed. Not only  
> the ‘special’ characters are hidden but all characters!  
> I am using wxRuby on windows XP. It doesn’t matter if I include the  
> special characters directly in the Ruby source code, or read them from  
> an external file (with IO.open).  
> To display non-ASCII eg accented characters, you need to ensure that the  
> string to be displayed is in UTF-8 encoding. wxRuby uses UTF-8  
> internally, so a single application can display characters in any  
> language for which the user has fonts installed.

I suggest you take a look at the sample text/unicode.rb which shows both  
how to display accented latin and non-Latin characters, and also how to  
use ruby’s iconv to convert to and from UTF-8.

hth  
alex
