PDA

View Full Version : How to show euro symbol in QT Creator console window



tapsa
26th March 2010, 20:36
Hi,
how do I get euro symbol shown in console window used in a simple statesment like this: cout << "Money €";
I have tried escape sequence etc but nothing seems to work.
QChar(8364) shows only question mark if translated to standard string.

br tapsa

Lykurg
26th March 2010, 20:56
cout << "Money €";
Works for me. Make sure your source code file is saved as utf8.

tapsa
26th March 2010, 21:07
Sorry but it doesn't work in a Windows machine and file encoding has no effect.
QChar(8364) works for ui like QLabel but even then plain "€" doesn't show.
My colleques have the same problem so it's not just my PC.

br tapani

tapsa
26th March 2010, 21:25
OK. I had to reopen the project after decoding to UTF-8 but now I get an error:
"Could not decode "main.cpp" with "UTF-8" -encoding. Editing is not possible".
Euro symbol is now replaced by a question mark and a green square in the edit view.
Any solution for this problem ?

br tapsa