(encoding, strict=0)
return 0
Given a string or numeric representation of an encoding, return the
    encoding code
Given a string or numeric representation of an encoding, return the
    encoding code
Given a string or numeric representation of an encoding return the encoding code
def lookupEncoding(encoding, strict=0):
    """Given a string or numeric representation of an encoding, return the
    encoding code"""
    if encoding is None:
        # Plain
        return 0
    if isinstance(encoding, IntType) and 0 <= encoding < len(Output.encodings):
        return encoding
    if isinstance(encoding, StringType):
        for i in range(len(Output.encodings)):
            if string.lower(encoding) in Output.encodings[i]:
                return i
    if strict:
        raise ValueError("Unsupported encoding %s" % encoding)
    # Return default
    return 0
def lookupEncoding ( encoding , strict = 0 ) : if encoding is None : # Plain return 0 if isinstance ( encoding , IntType ) and 0 <= encoding < len ( Output . encodings ) : return encoding if isinstance ( encoding , StringType ) : for i in range ( len ( Output . encodings ) ) : if string . lower ( encoding ) in Output . encodings [ i ] : return i if strict : raise ValueError ( "Unsupported encoding %s" % encoding ) # Return default return 0