-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Currently, if the files.encoding
setting is changed, a new parse-root occurs. That's not sufficient.
The value of files.encoding
is used to interpret files read directly from disk by the native processes (cpptools.exe
and cpptools-srv.exe
). If a file does not have a BOM and is not detected to be UTF-16, it's assumed to be in the specified encoding. Files are converted from that encoding to UTF-8. (VS Code does the same. It provide buffers for files open in the editor that are already converted to UTF-8).
Either the entire database needs to be reset, or encoding info about the file could be added to the database and only those files that had relied upon the default/fallback encoding could be purged/reparsed.
The last seen encoding setting value should also be persisted. If the user changes the encoding when the C/C++ extension is not active, the database work still needs to occur.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status