def read_file_unix_endings(file_name, encoding='utf8', ignore=True):
 if _ST3:
  errors = ('ignore' if ignore else 'strict')
  with open(file_name, 'rt', encoding=encoding, errors=errors) as f:
   file_content = f.read()
 else:
  file_content = _read_file_content(file_name, encoding, ignore)
  file_content = file_content.replace('\r\n', '\n')
 return file_content

def read_file_unix_endings ( file_name , encoding = 'utf8' , ignore = True ) : if _ST3 : errors = ( 'ignore' if ignore else 'strict' ) with open ( file_name , 'rt' , encoding = encoding , errors = errors ) as f : file_content = f . read ( ) else : file_content = _read_file_content ( file_name , encoding , ignore ) file_content = file_content . replace ( '\r\n' , '\n' ) return file_content
reads a file with unix line endings and converts windows line endings into line endings .