Results 1 to 3 of 3

Thread: Punctuation gives stange characters using cout

  1. #1
    Join Date
    Mar 2014
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Punctuation gives stange characters using cout

    The following code gives a strange result on the screen with the character ë, also other punctuations gives unreadable output. What do I wrong?


    Qt Code:
    1. #include <iostream>
    2.  
    3. using namespace std;
    4.  
    5. int main()
    6. {
    7. cout << "patiënt";
    8.  
    9. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Oct 2013
    Posts
    142
    Thanks
    36
    Thanked 3 Times in 3 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Punctuation gives stange characters using cout

    Are you using Qt Creator?

    In Qt Creator 3.0.1, on Ubuntu 13.10 works fine for me.

    Aditionally you can try other character types.
    Last edited by adutzu89; 5th March 2014 at 13:45.

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Punctuation gives stange characters using cout

    You might not be doing anything wrong, but the two encodings might not match.

    E.g. if your file encoding is UTF-8 and your console encoding is not, or vice versa.

    Cheers,
    _

Similar Threads

  1. cout in Qt
    By qt_developer in forum Newbie
    Replies: 3
    Last Post: 25th May 2012, 22:02
  2. Replies: 15
    Last Post: 15th April 2011, 12:55
  3. where is cout
    By hqking1988 in forum General Programming
    Replies: 3
    Last Post: 22nd August 2010, 03:35
  4. stange error
    By sawerset in forum Qt Programming
    Replies: 1
    Last Post: 24th September 2008, 20:27
  5. How to cout in Qt ?
    By probine in forum Qt Programming
    Replies: 4
    Last Post: 15th December 2006, 00:47

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.