SFML community forums

Help => Graphics => Topic started by: manolismi on June 09, 2014, 08:05:21 pm

Title: Non ascii text problems
Post by: manolismi on June 09, 2014, 08:05:21 pm
I want this text to be shown: Το παλίνδρομο τεστ!
It's non ASCII so I use the L as told in the tutorials: text.setString(L"Το παλίνδρομο τεστ!");
And i get error : 17   13   E:\plir\Untitled7.cpp   [Error] converting to execution character set: Illegal byte sequence

I use dev c++ 5.6.3 with mingw
Title: Re: Non ascii text problems
Post by: Ixrec on June 09, 2014, 08:07:11 pm
Is your source file encoded in UTF-8?
Title: Re: Non ascii text problems
Post by: manolismi on June 09, 2014, 10:00:11 pm
I don't know, I tried to find so in the editor options but it doesn't say anything.
I searched google and found out that by using your codepage it works.
I did so, and i print it with wcout but it prints nothing although it compiles.
Could utf-8 get enabled with a macro or a linker command?
Title: Re: Non ascii text problems
Post by: Ixrec on June 09, 2014, 10:08:30 pm
You should probably just upgrade to a better text editor.  For instance, Notepad++ shows the current encoding in the bottom-right corner and lets you convert between common encodings at any time from the Encoding menu.  These days any decent editor should make them similarly easy to deal with.

If you have to mess with code pages, something's gone horribly wrong.  The whole point of Unicode is to eliminate that klunky system.
Title: Re: Non ascii text problems
Post by: manolismi on June 13, 2014, 08:33:24 pm
Ixrec thank you very much, you're my savior!!!! I opened the source file with notepad from windows and just changed the encoding and worked. :)