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
{{ message }}
Repository navigation
Changes to files.encoding should trigger purge/reparse of all files (without BOM) in DB #10892
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.
Activity