def ascii_encoding(s):
    """ return 0 if the text s is not an ascii text, 1 if the text
        is a plain ASCII text, 2 if the text is ISO-8859, 3 if the file 
        is an non ISO extended text file"""
    s = s.translate(TEXT_CHARS, PLAIN_ASCII)
    for i in "032":
        if i in s:
            return int(i)
    return 1
 return 0 if the text s is not an ascii text, 1 if the text
        is a plain ASCII text, 2 if the text is ISO-8859, 3 if the file 
        is an non ISO extended text file
recipes/Python/163743_ASCII_encoding_guess/recipe-163743.py