Results 1 to 4 of 4

Thread: How to show euro symbol in QT Creator console window

  1. #1
    Join Date
    Mar 2010
    Posts
    3

    Default How to show euro symbol in QT Creator console window

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to show euro symbol in QT Creator console window

    Quote Originally Posted by tapsa View Post
    cout << "Money €";
    Works for me. Make sure your source code file is saved as utf8.

  3. #3
    Join Date
    Mar 2010
    Posts
    3

    Default Re: How to show euro symbol in QT Creator console window

    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

  4. #4
    Join Date
    Mar 2010
    Posts
    3

    Default Re: How to show euro symbol in QT Creator console window

    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

Similar Threads

  1. Simulating a console window
    By Doug Broadwell in forum Newbie
    Replies: 3
    Last Post: 18th February 2011, 15:30
  2. Replies: 2
    Last Post: 22nd March 2010, 08:54
  3. Debugging in MSVS leaves zombie console window
    By T4ng10r in forum Qt Programming
    Replies: 3
    Last Post: 11th March 2010, 09:59
  4. Why there is not console window?
    By HelloDan in forum Qt Programming
    Replies: 2
    Last Post: 8th April 2009, 16:02
  5. qt without console window
    By jh in forum Qt Programming
    Replies: 3
    Last Post: 28th January 2006, 20:01

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.