Skip to content

Strip BOM from files after reading#217

Merged
jakebailey merged 1 commit intomicrosoft:mainfrom
jakebailey:bom
Apr 21, 2026
Merged

Strip BOM from files after reading#217
jakebailey merged 1 commit intomicrosoft:mainfrom
jakebailey:bom

Conversation

@jakebailey
Copy link
Copy Markdown
Member

@jakebailey jakebailey commented Apr 21, 2026

VS Code strips this, and so does tsserver/tsgo when reading from disk. Sending the BOM over causes bad behaviors.

https://github.com/microsoft/vscode/blob/ea91ac3285ad7dcf0d9d259e856a952c674ce9a9/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.ts#L105

@jakebailey jakebailey requested a review from gabritto April 21, 2026 18:35
@jakebailey jakebailey merged commit 4ae8f5a into microsoft:main Apr 21, 2026
2 checks passed
@jakebailey jakebailey deleted the bom branch April 21, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants