private static boolean isBinaryContent(byte @NotNull [] content, @NotNull FileType fileType) {
    if (fileType instanceof UIBasedFileType) {
      return true; // text file, that should be shown as binary (SVG, UI Forms).
    }

    if (!fileType.isBinary()) {
      return false;
    }

    if (UnknownFileType.INSTANCE.equals(fileType) ||
        fileType instanceof INativeFileType ||
        Registry.is("diff.use.aggressive.text.file.detection")) {
      return guessCharsetFromContent(content) == null;
    }
    return true;
  }
private static boolean isBinaryContent(byte @NotNull [] content, @NotNull FileType fileType)