title: result = result.decode('utf-8') UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 321: invalid start byte
body: <p>I have this code:</p>
  <pre><code>        try:
              execute = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
              print('execute', execute)
              result = execute.stdout.read() + execute.stderr.read()
              print('normal result', result)
              result = result.decode('utf-8')
              print('decoded result:  ', result)
              reliable_send(result)
          except:
              reliable_send('Something went wrong ;- (')
  </code></pre>
  <p>Some commands like whoami or arp-a are working fine and i receive the result to my server, but when i try to get dir or ipconfig this line <strong>result = result.decode('utf-8')</strong> throws an exception, what is the problem? Am I doing something wrong?</p>
  <p>The error:</p>
  <p>result = result.decode('utf-8')
  UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 321: invalid start byte</p>