def _check_line_for_encoding(line): """returns the declared encoding or None""" i = 0 for i in range(len(line)): if line[i] == '#': break if line[i] not in ' \t\014': return None, False # Not a comment, don't read the second line. return pytokenizer.match_encoding_declaration(line[i:]), True
def _check_line_for_encoding(line): """returns the declared encoding or None""" i = 0 for i in range(len(line)): if line[i] == '#': break if line[i] not in ' \t\014': return None, False # Not a comment, don't read the second line. return pytokenizer.match_encoding_declaration(line[i:]), True
def _check_line_for_encoding(line): """returns the declared encoding or None""" i = 0 for i in range(len(line)): if line[i] == '#': break if line[i] not in ' \t\014': return None return pytokenizer.match_encoding_declaration(line[i:])
def _check_line_for_encoding(line): """returns the declared encoding or None""" i = 0 for i in range(len(line)): if line[i] == '#': break if line[i] not in ' \t\014': return None return pytokenizer.match_encoding_declaration(line[i:])