# SFML title bar with weird characters when using UTF-8

I've just started using SFML and one of the first problems I've come across is some weird characters on the the titlebar whenever I try to use accents or any other extended char.

For instance, I've got:

sf::RenderWindow Ventana(sf::VideoMode(800, 600, 32), "Año nuevóóó");


And the titlebar renders like AÂ+o nuevoA³A³A³

This ONLY HAPPENS if my source code file is enconded in UTF-8. If I change the file encoding to ISO-8859-1, it shows properly. Obviously all of my files use UTF-8, as its the system-wide encoding. I'm using GCC under Ubuntu GNU/Linux.

I've tried using the different utilities in sf::Unicode to adapt the text, but none of them seems to work.

• This isn't really game development related, though I see you came here after receiving no response from SO after two days... Have you tried the SFML forums? sfml-dev.org/forum – Ricket Feb 9 '11 at 22:30
• One of the problems in debugging problems like this is that the issue can lie anywhere from passing the wrong -fexec-charset to GCC to your window manager implementing Unicode conversion incorrectly. The best approach is usually to break out a debugger and step through as much as you need to to see what failed. – user744 Feb 9 '11 at 23:07