Results 1 to 18 of 18

Thread: ReadAllStandardOutput() is returning empty characters if they are not recognised

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,540
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanked 284 Times in 279 Posts

    Default Re: ReadAllStandardOutput() is returning empty characters if they are not recognised

    Perhaps the problem is the Windows code page. I did the test with "Polish letters" and everything is OK but the result from youtube-dl is encoded in 1250 (8-bit code page) and not UTF-8. This is the link used for the test: https://www.youtube.com/watch?v=ndG8bM-9CMA
    Can you provide the Japanese alphabet link to test?
    P.S.
    Test with arabic alphabet : https://www.youtube.com/watch?v=7Tc7LWpe7mg. Output generated on Windows is 29 bytes long, on Linux 85 bytes long. In my opinion it's an internal problem of youtube-dl.
    Last edited by Lesiok; 19th August 2019 at 12:08.

  2. #2
    Join Date
    Jul 2019
    Posts
    32
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    5

    Default Re: ReadAllStandardOutput() is returning empty characters if they are not recognised

    Quote Originally Posted by Lesiok View Post
    Perhaps the problem is the Windows code page. I did the test with "Polish letters" and everything is OK but the result from youtube-dl is encoded in 1250 (8-bit code page) and not UTF-8. This is the link used for the test: https://www.youtube.com/watch?v=ndG8bM-9CMA
    Can you provide the Japanese alphabet link to test?
    P.S.
    Test with arabic alphabet : https://www.youtube.com/watch?v=7Tc7LWpe7mg. Output generated on Windows is 29 bytes long, on Linux 85 bytes long. In my opinion it's an internal problem of youtube-dl.
    Link with Japanese Alphabet: https://www.youtube.com/watch?v=Bsfi4XbPE8M. I tried your link both with cmd and then with QProcess. When I tried the command in cmd with arabic alphabet link I got something like this ????? ??????? ?????? _35_ ????? ?????? The Ultimate Ninj, but if I copy paste the output(the title) in a browser I get the correct title.

    When I tried with QProcess I got something like this: " _35_ The Ultimate Ninj". Maybe it's a problem with youtube-dl, I don't know.

    I attached a photo to see how title looks after I copy-paste it in a browser from cmd.
    Attached Images Attached Images
    Last edited by INeedADollar; 19th August 2019 at 12:40.

  3. #3
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,540
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanked 284 Times in 279 Posts

    Default Re: ReadAllStandardOutput() is returning empty characters if they are not recognised

    definitely an environmental problem (operating system). On linux in a graphical environment (fonts installed for all alphabets) this result:
    gc.PNG
    On linux in a character environment like this:
    tc.jpg

  4. #4
    Join Date
    Jul 2019
    Posts
    32
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    5

    Default Re: ReadAllStandardOutput() is returning empty characters if they are not recognised

    Quote Originally Posted by Lesiok View Post
    definitely an environmental problem (operating system). On linux in a graphical environment (fonts installed for all alphabets) this result:
    gc.PNG
    On linux in a character environment like this:
    tc.jpg
    Ok thank you very much! Thank you very much all that tried to help me!

  5. #5
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanked 86 Times in 81 Posts

    Default Re: ReadAllStandardOutput() is returning empty characters if they are not recognised

    You're still outputting the data to the command line instead using a QMessageBox as I said in my second post so it can't work... https://www.qtcentre.org/threads/704...088#post306088

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

    Default Re: ReadAllStandardOutput() is returning empty characters if they are not recognised

    If it is a problem with the normal output of the Windows version of youtube-dl you could try its JSON output options.

    Cheers,
    _

Similar Threads

  1. Replies: 10
    Last Post: 6th February 2015, 12:41
  2. Replies: 13
    Last Post: 27th August 2014, 11:06
  3. QProcess::readAllStandardOutput and QTextEdit
    By naptizaN in forum Qt Programming
    Replies: 1
    Last Post: 13th December 2012, 07:50
  4. Returning const &
    By frenk_castle in forum Newbie
    Replies: 2
    Last Post: 24th November 2009, 07:01
  5. remove directory empty or not empty
    By raphaelf in forum Newbie
    Replies: 12
    Last Post: 27th October 2006, 07:30

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.