def decode_read_data(read: list, encoding='utf-8'):
    """
    Interprets bytes under the specified encoding, to produce a decoded string.
    """
    decoded = ""
    try:
        decoded = bytes(read).decode(encoding).rstrip('\0')
    except UnicodeDecodeError:
        return decoded

    return decoded