Skip to content

Conversation

busorgin
Copy link

Fix for #251527

Issue can be replicated with the steps shown in the issue.

DiskFileSystemProvider.readdir() will create a promise which will contain the list of files in our folder, this message is serialized correctly with the BOM character preserved. The issue occurs when ChannelClient.onBuffer() tries to deserialize the message. In VSBuffer.toString() a default instance of TextDecoder is used which has ignoreBOM set to false meaning the BOM character will be stripped.

@Copilot Copilot AI review requested due to automatic review settings October 21, 2025 02:06
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug where the Byte Order Mark (BOM) character was being incorrectly stripped during message deserialization in VSBuffer.toString(). The fix ensures the BOM character is preserved by explicitly setting ignoreBOM: true when creating the TextDecoder instance.

Key Changes:

  • Modified TextDecoder instantiation to preserve BOM characters during UTF-8 decoding

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.

3 participants