-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to configure a list of encoding-confidences to use when guessing #84503
Comments
(Experimental duplicate detection) |
@sunbohong are you planning to contribute to JSChardet? |
I found that https://github.com/runk/node-chardet can meet my requirements. |
I am not sure VSCode would move off |
I tried to add some logs to
|
Since jschardet can't provide the expected results. |
I like the mode provided by node-chardet. Just a friendly reminder that please always use Reasons:
All in all, the safest way is always using Here is a file encoded by GB18030 for your test. |
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation. Happy Coding! |
This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation. Happy Coding |
1 similar comment
This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation. Happy Coding |
🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation. Happy Coding! |
@sunbohong please merge this with #36951, I feel the 2 suggestions are very similar. |
When we use the new version of |
Some requirements to go with another library such as
|
/duplicate #36951 |
Since there were so many encodings issues,I plan to upgrade the code guessing workflow to V2.
First, jschardet will be upgraded and multiple results will be returned. For example,
[{encoding: 'UTF-8', confidence: 0.95}, {encoding: 'GBK', confidence: 0.95}]
.Then, we will support the configuration of multiple sets of coding confidence in the settings.
files.encodingInitConfidences
。[{encoding:'utf-8',confidence:0.01},{encoding:'GBK',confidence:0.03}]。
Finally,add the two together to get the final result, because
GBK
has the highest confidence, so the file is recognized asGBK
[{encoding:'utf-8',confidence:0.06},{encoding:'GBK',confidence:0.08}]
。The text was updated successfully, but these errors were encountered: