def convertToAscii(string, error="<STR_LIT:?>"):
running = True<EOL>asciiString = string<EOL>while running:<EOL><INDENT>try:<EOL><INDENT>asciiString = asciiString.encode('<STR_LIT:ascii>')<EOL><DEDENT>except UnicodeError as unicode:<EOL><INDENT>start = unicode.start<EOL>end = unicode.end<EOL>asciiString = asciiString[:start] + "<STR_LIT:?>" + asciiString[end:]<EOL><DEDENT>else:<EOL><INDENT>running = False<EOL><DEDENT><DEDENT>return asciiString<EOL>
Utility function that converts a unicode string to ASCII. This
            exists so the :class:`Comic` class can be compatible with Python 2
            libraries that expect ASCII strings, such as Twisted (as of this writing,
            anyway). It is unlikely something you will need directly, and its
            use is discouraged.

            Arguments:

                    string: the string to attempt to convert.

                    error: a string that will be substituted into 'string' wherever Python is unable
                    to automatically do the conversion.

            convertToAscii returns the converted string.