(self, shell_output)
return False
Detect UTF-16LE output.
Detect UTF-16LE output.
Detect UTF - 16LE output .
def _detect_encoding(self, shell_output):
        """Detect UTF-16LE output."""
        if self._encoding:
            return True
        elif len(shell_output) > 1:
            # detect UTF-16 output (assuming the first output char is ascii...)
            self._encoding = 'utf-16le' if shell_output[1] == b'\0' else SHELL_ENCODING
            return True
        return False
def _detect_encoding ( self , shell_output ) : if self . _encoding : return True elif len ( shell_output ) > 1 : # detect UTF-16 output (assuming the first output char is ascii...) self . _encoding = 'utf-16le' if shell_output [ 1 ] == b'\0' else SHELL_ENCODING return True return False