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
Click the change indicator to the left and choose "Stage change". Do NOT stage the whole file
Commit the staged change
The file in HEAD is now UTF-8, not UTF-8 with BOM. I.e. VSCode removed the EF BB BF bytes at the start of the file. The file in the current workspace is still UTF-8 with BOM, meaning if you now stage the whole file it will revert back to a UTF-8 with BOM file, but the history will show it first being converted to UTF-8, then back to UTF-8 with BOM.
This is not the same behaviour as staging individual changes with git add -p
VS Code version: Code 1.81.1 (6c3e3db, 2023-08-09T22:22:42.175Z)
OS version: Windows_NT x64 10.0.22621
Modes:
System Info
Item
Value
CPUs
Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz (12 x 3696)
This bug is annoying when working on Visual Studio projects because Visual Studio creates BOMs by default, but VSCode silently removes them leading to a mix of encodings.
Our old codebase uses mostly windows-1252, and we need to use this encoding. When we stage only selected ranges, it will commit the file as utf-8. This is very annoying.
Type: Bug
The file in HEAD is now UTF-8, not UTF-8 with BOM. I.e. VSCode removed the EF BB BF bytes at the start of the file. The file in the current workspace is still UTF-8 with BOM, meaning if you now stage the whole file it will revert back to a UTF-8 with BOM file, but the history will show it first being converted to UTF-8, then back to UTF-8 with BOM.
This is not the same behaviour as staging individual changes with git add -p
VS Code version: Code 1.81.1 (6c3e3db, 2023-08-09T22:22:42.175Z)
OS version: Windows_NT x64 10.0.22621
Modes:
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Extensions (17)
A/B Experiments
The text was updated successfully, but these errors were encountered: