def METHOD_NAME(self, command):
    """Split the command using shell-like syntax."""
    encoded = self.encode_utf8(command)
    try:
        splitted = [s.replace("??", "\\ ") for s in shlex.split(encoded.replace('\\ ', '??'))]
    except ValueError:
        splitted = encoded.split(' ')
    return self.decode_utf8(splitted)