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
When you try to add characters not supported by latin1 to a file that will be saved as latin1, there is no warning to tell you that those characters will be lost on save.
Even worse, the problem doesn't appear right after you save so you can fix it. It's only when you close and re-open the file that you'll notice that the characters were replaced by ?. (Note that sometimes, VS Code seems to cache the file and you have to restart VS Code to see the change to ?)
If the information was not previously added to git, this means that the information there would be permanently lost.
Demo:
demo-editorconfig.mp4
I know that this is something that should be handled from the VS Code side (see microsoft/vscode#44505). However it's good to document the issue here as well since the issue is closed on the VS Code side.
Also note that I've submitted a PR (pillarjs/iconv-lite#388) that would (if merged) allow VS Code to know when re-encoding into a single-byte encoding such as Latin1 would cause a loss of information. Then VS Code should be able to prevent that from happening an abort the re-encoding process with a warning to the user.
When you try to add characters not supported by
latin1to a file that will be saved aslatin1, there is no warning to tell you that those characters will be lost on save.Even worse, the problem doesn't appear right after you save so you can fix it. It's only when you close and re-open the file that you'll notice that the characters were replaced by
?. (Note that sometimes, VS Code seems to cache the file and you have to restart VS Code to see the change to?)If the information was not previously added to git, this means that the information there would be permanently lost.
Demo:
demo-editorconfig.mp4
I know that this is something that should be handled from the VS Code side (see microsoft/vscode#44505). However it's good to document the issue here as well since the issue is closed on the VS Code side.
Also note that I've submitted a PR (pillarjs/iconv-lite#388) that would (if merged) allow VS Code to know when re-encoding into a single-byte encoding such as Latin1 would cause a loss of information. Then VS Code should be able to prevent that from happening an abort the re-encoding process with a warning to the user.