checking encoding of files