code: def check_file_encoding(self, input_file_path):
          
          self.log([u"Checking encoding of file '%s'", input_file_path])
          self.result = ValidatorResult()
          if self._are_safety_checks_disabled(u"check_file_encoding"):
              return self.result
          if not gf.file_can_be_read(input_file_path):
              self._failed(u"File '%s' cannot be read." % (input_file_path))
              return self.result
          with io.open(input_file_path, "rb") as file_object:
              bstring = file_object.read()
              self._check_utf8_encoding(bstring)
          return self.result
docs: Check whether the given file is UTF-8 encoded.
  
          :param string input_file_path: the path of the file to be checked
          :rtype: :class:`~aeneas.validator.ValidatorResult`