Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How to set the text encoding within the "Application Output" window?
Forum Updated to NodeBB v4.3 + New Features

How to set the text encoding within the "Application Output" window?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
5 Posts 4 Posters 3.4k 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.
  • L Offline
    L Offline
    laplacedoge
    wrote on 1 Mar 2022, 10:11 last edited by
    #1

    I'm a QT developer from China, so the default console encoding of my Windows11 is GBK, but the encoding of my source file is UTF-8, it doesn't show the same text(For example it shows "Hello, 世界!" in source file but "Hello, 涓栫晫!" in the "Application Output" windows), how to solve this problem?

    Such thing like use "CHCP 65001" in the code or setting the encoding of the "Application Output" windows?

    1 Reply Last reply
    1
    • C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 1 Mar 2022, 11:24 last edited by
      #2

      The 'Application Output' is a debug output window. I'm not aware that you can set a text codec there.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1
      • C Offline
        C Offline
        cristian-adam
        wrote on 2 Mar 2022, 14:02 last edited by
        #3

        You need to do two things:

        1. Enable UTF-8 for "Language for non-Unicode programs"
          alt text
        2. Set UTF-8 for Qt Creator's codec for tools
          alt text

        This works starting with Qt Creator 4.15

        1 Reply Last reply
        5
        • C Offline
          C Offline
          cristian-adam
          wrote on 2 Mar 2022, 14:03 last edited by
          #4

          https://bugreports.qt.io/browse/QTCREATORBUG-24776 has details about the feature.

          1 Reply Last reply
          1
          • L Offline
            L Offline
            leenamiettinen
            wrote on 2 Mar 2022, 15:04 last edited by
            #5

            It is documented here: https://doc.qt.io/qtcreator/creator-output-panes.html

            1 Reply Last reply
            1

            1/5

            1 Mar 2022, 10:11

            • Login

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