Results 1 to 3 of 3

Thread: Any way to put Unicode character in QString without using QString("%1").arg(QChar)?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Apr 2013
    Location
    Prague
    Posts
    258
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    3
    Thanked 65 Times in 59 Posts

    Default Re: Any way to put Unicode character in QString without using QString("%1").arg(QChar

    It's a problem of qDebug(), not of QString. The QString handles Unicode correctly. The literals like "Texte en français" will be Unicode "Texte en français" in QString. The "Texte en fran\u00C7ais" will not work in QString, the QString does not know the "\unnnn" escapes and will put "\unnnn" in the QString instead of "nnnn" converted to int.

    qDebug() seems to use code pages internally even if the operating system is Unicode (like Linux).

  2. The following user says thank you to Radek for this useful post:

    oddity (13th November 2013)

Similar Threads

  1. Replies: 10
    Last Post: 17th July 2014, 10:52
  2. Replies: 1
    Last Post: 14th May 2011, 08:02
  3. Replies: 28
    Last Post: 22nd February 2010, 10:27
  4. Need definedInHeader("QString") == "q<somewhere>.h"
    By muenalan in forum Qt Programming
    Replies: 6
    Last Post: 29th September 2009, 11:04
  5. Error "QString::arg: Argument missing"
    By Lawand in forum Qt Programming
    Replies: 3
    Last Post: 18th February 2009, 20:26

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.