-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Add a boolean property to TextDocument
if the encoding was guessed
#209503
Comments
In addition to the original encoding, it would also be very helpful to have access to (a bool indicating) whether or not the file was re-encoded from the encoding specified by the |
Related: #824 |
I would like to go ahead and merge into #824 as per the original request. #209503 (comment) seems unrelated/additive, so I would suggest to report as individual new issue. |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
@Colengms 👋 friendly ping for request for input: #824 (comment) |
Hi @bpasero . Re: #824 (comment) , would it be possible to throw in just an additional boolean to indicate whether the encoding provided was detected as a result of a guess, due to |
I do not think we would add that to the API given the very little use of that |
Hi @bpasero . If, in additional to the original encoding, we could get this boolean, and it were false, it would indicate that no further work is needed. It's only when Note that there are some scenarios our users are running into that may currently only be addressable using |
TextDocument
if the encoding was guessed
What specifically is the difference between a text document where the encoding was guessed vs. when the encoding was configured by the user or set explicitly after opening? Especially since guessing the encoding very often just yields the wrong encoding? |
@Colengms btw latest VS Code insiders ships with the vscode/src/vscode-dts/vscode.proposed.textDocumentEncoding.d.ts Lines 6 to 30 in 80b20f3
|
This is a request for API access to the original encoding of a file. i.e.:
(If this is already possible, please let me know. I couldn't find it.)
If I understand correctly, VS Code represents the content of open files to extensions as UTF-8. In the C/C++ Extension, there are scenarios in which IntelliSense should reflect how the compiler would interpret the file, which may depend on the files actual encoding. i.e. MSVC and string literal contents.
The text was updated successfully, but these errors were encountered: