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. How to Get QProcess Text ?
Forum Updated to NodeBB v4.3 + New Features

How to Get QProcess Text ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 200 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.
  • P Offline
    P Offline
    Pada_
    wrote on last edited by
    #1

    I have Qt 5.4 version and
    Linux 64 Bit & Windows 8 64 Bit are used.

    I am using Hangeul.

    Write / home / "바탕화면" on QProcess,
    QByteArray byteArray = process-> readAllStandardOutput ();
    byteArray is represented by strange characters and numbers, such as / home / -24.

    When executed, all Hangul characters are displayed strangely.

    Is there any way to get Hangeul normally?

    Thanks.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      Gerald.L.
      wrote on last edited by
      #2

      Try class QTextCodec, the example code:

      QByteArray encodedString = "...";
      QTextCodec *codec = QTextCodec::codecForName("KOI8-R");
      QString string = codec->toUnicode(encodedString);
      

      p.s. KOI8-R is for Russian.

      1 Reply Last reply
      3

      • Login

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