in Utf8Test.py [0:0]
def TestMdEncodingOk(self, apath, encoding):
try:
with open(apath, "rb") as fobj:
fobj.read().decode(encoding)
except Exception as exp:
logging.error("Encoding failure {1}: {0}".format(apath, encoding))
logging.debug("EXCEPTION: while processing {1} - {0}".format(exp, apath))
return False
return True