Changes to files.encoding
should trigger purge/reparse of all files (without BOM) in DB
#10892
Labels
bug
fixed
Check the Milestone for the release in which the fix is or will be available.
Language Service
parser
world ready
An issue relating string character encodings, localization translations, etc.
Milestone
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
andcpptools-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.
The text was updated successfully, but these errors were encountered: