Charset (@NotNull VirtualFile virtualFile, byte @NotNull [] content, @NotNull FileType fileType) { Charset internalCharset = detectInternalCharsetAndSetBOM(virtualFile, content, content.length, true, fileType).hardCodedCharset; return internalCharset instanceof SevenBitCharset ? ((SevenBitCharset)internalCharset).myBaseCharset : internalCharset; }