Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED]printing a string with chinese characters
QtWS25 Last Chance

[SOLVED]printing a string with chinese characters

Scheduled Pinned Locked Moved General and Desktop
qstring
3 Posts 2 Posters 2.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GrahamL
    wrote on 30 Jul 2015, 13:00 last edited by GrahamL
    #1

    Hi
    I have QString containing Chinese characters

    wstring w = L"列举 1";
    QString ws = QString::fromStdWString(w);
    

    Looking at ws in the debugger shows Chinese characters but output via qDebug shows '??'

    Any idea on how I can get qDebug to print this correctly?

    Thanks

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 30 Jul 2015, 13:27 last edited by
      #2

      @GrahamL said:

      Unless they fixed it in later version it wont work on windows.

      http://stackoverflow.com/questions/16884570/qdebug-doesnt-support-unicode-strings-on-windows

      1 Reply Last reply
      1
      • G Offline
        G Offline
        GrahamL
        wrote on 30 Jul 2015, 13:30 last edited by
        #3

        Ok

        Thanks

        1 Reply Last reply
        0

        2/3

        30 Jul 2015, 13:27

        • Login

        • Login or register to search.
        2 out of 3
        • First post
          2/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved