Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Non ascii text problems  (Read 1407 times)

0 Members and 1 Guest are viewing this topic.

manolismi

  • Newbie
  • *
  • Posts: 10
    • View Profile
Non ascii text problems
« 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

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: Non ascii text problems
« Reply #1 on: June 09, 2014, 08:07:11 pm »
Is your source file encoded in UTF-8?

manolismi

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Non ascii text problems
« Reply #2 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?

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: Non ascii text problems
« Reply #3 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.

manolismi

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Non ascii text problems
« Reply #4 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. :)