提交 710965e7 编写于 作者: B Benjamin Pasero

fix invalid utf 8 bom indicator

上级 b7ba7b58
......@@ -468,8 +468,12 @@ export class FileService implements files.IFileService {
fileEncoding = override;
} else if (candidate) {
fileEncoding = candidate;
} else if (this.options) {
fileEncoding = this.options.encoding;
} else {
if (this.options.encoding === encoding.UTF8_with_bom) {
fileEncoding = encoding.UTF8; // if we did not detect UTF 8 BOM before, this can only be UTF 8 then
} else {
fileEncoding = this.options.encoding;
}
}
if (!fileEncoding || !encoding.encodingExists(fileEncoding)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册