corrected sha1 calculation for non utf8 files