Skip to content

"Encoding not recognized" #25359

@roblourens

Description

@roblourens
  • Open folder with git enabled
  • Set "files.encoding": "utf8bom"
  • Reload window
  • See error in devtools console
[Extension Host] Error: Encoding not recognized: 'utf8bom' (searched as: 'utf8bom')
    at Object.getCodec (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/git/node_modules/iconv-lite/lib/index.js:102:23)
    at Object.getDecoder (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/git/node_modules/iconv-lite/lib/index.js:118:23)
    at Object.decode (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/git/node_modules/iconv-lite/lib/index.js:36:25)
    at Socket.once (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/git/out/git.js:126:59)
    at Object.onceWrapper (events.js:290:19)
    at emitOne (events.js:101:20)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:501:12)
  • "utf8bom" is an encoding that we apparently support as it shows up in the intellisense for that setting. I thought that list came from encodings supported by iconv-lite. Not sure whether git is doing something different, or whether it doesn't work in the editor either. But, I had an issue filed about this encoding label not being supported by ripgrep so people are using it.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable buggitGIT issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions