def clean_str(source_str, replace='?'):
    """Ensure :ref:`ASCII` characters, and replace any non ascii

    :param source_str: The source str to clean
    :type source_str: str
    :param replace: The character(s) to replace non ascii characters with
    :type replace: str
    :return: a `tuple` containing

             - The ascii string
             - `True` if a non ascii character was encounteres, otherwise `False`
    """
    illegal = False
    try:
        sss = source_str.decode('ascii')
        return sss, illegal
    except UnicodeDecodeError:
        safeS = ''
        illegal = True
        for cIdx in range(0, len(source_str)):
            singleS = source_str[cIdx]
            if ord(singleS) < 128:
                safeS += singleS
            else:
                safeS += replace
    return safeS, illegal
