You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
utf-8(['ascii', 'utf-8', 'utf-16', 'utf-32']) encoding guessing is disabled by this line. Ignore encodings that cannot guess correctly
But this link didn't mention it.
And in my test,the follow text will be guessing as utf-8 correctly(result='utf-8').
jschardet result:
In the other hand,with the follow setting, it will be detect as GBK
I like this change because it makes jschardet more deterministic by giving it full control over the detection. I still think more work is needed to increase the confidence of the detection, but that can continue in other issues.
Activity
vscodebot commentedon Nov 11, 2019
(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
sunbohong commentedon Nov 12, 2019
These issues will be solve by #84503
sunbohong commentedon Nov 12, 2019
In particular, aadsm/jschardet#48 will be treat as
utf-8bpasero commentedon Nov 12, 2019
I like this change because it makes
jschardetmore deterministic by giving it full control over the detection. I still think more work is needed to increase the confidence of the detection, but that can continue in other issues.bpasero commentedon Nov 12, 2019
酷酷的哀殿 (@sunbohong) I noticed a bad regression though that made me push ddfca30 to ignore the guessed encoding "ascii" for a simple reason:
=> the file is still guessed as "ascii" because it was not saved with a proper encoding
bpasero commentedon Nov 19, 2019
Verification:
"files.autoGuessEncoding": true"files.encoding": "windows1252"(simply to a non-UTF8 encoding)私は和食が好きです。) as UTF-8=> the encoding should be
UTF-8from the status bar.bpasero commentedon Dec 5, 2019
Given scary issues such as #85821 I am putting UTF-16 and 32 back to the list of ignored encodings for guessing. Still, UTF-8 can be guessed.
sunbohong commentedon Dec 5, 2019
Benjamin Pasero (@bpasero) From this issue #85821, we really need to replace jschardet with a new library