This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Uncaught Error: Encoding not recognized: 'utf-8-bom' (searched as: 'utf8bom') #5593
Copy link
Copy link
Closed
Labels
Description
- Try saving a UTF-8 file which has a BOM.
Atom Version: 0.179.0
System: Mac OS X 10.9.5
Thrown From: Atom Core
Stack Trace
Uncaught Error: Encoding not recognized: 'utf-8-bom' (searched as: 'utf8bom')
At /Applications/Atom.app/Contents/Resources/app/src/pane.js:782
Error: Encoding not recognized: 'utf-8-bom' (searched as: 'utf8bom')
at Object.getCodec (/Applications/Atom.app/Contents/Resources/app/node_modules/6to5-core/node_modules/regenerator-6to5/node_modules/commoner/node_modules/iconv-lite/lib/index.js:104:23)
at Object.encode (/Applications/Atom.app/Contents/Resources/app/node_modules/6to5-core/node_modules/regenerator-6to5/node_modules/commoner/node_modules/iconv-lite/lib/index.js:16:25)
at File.module.exports.File.writeFileSync (/Applications/Atom.app/Contents/Resources/app/node_modules/pathwatcher/lib/file.js:241:49)
at File.module.exports.File.writeFileWithPrivilegeEscalationSync (/Applications/Atom.app/Contents/Resources/app/node_modules/pathwatcher/lib/file.js:304:21)
at File.module.exports.File.write (/Applications/Atom.app/Contents/Resources/app/node_modules/pathwatcher/lib/file.js:293:12)
at TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:970:17)
at TextBuffer.module.exports.TextBuffer.save (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:958:19)
at TextEditor.module.exports.TextEditor.save (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:620:26)
at Pane.module.exports.Pane.saveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:542:18)
at Pane.module.exports.Pane.saveActiveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:525:19)
at Workspace.module.exports.Workspace.saveActivePaneItem (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:679:35)
at atom-workspace.atom.commands.add.core:save (/Applications/Atom.app/Contents/Resources/app/src/workspace-element.js:295:30)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:172:20)
Commands
-5:51.7 core:save (atom-text-editor.editor.is-focused)
-5:14.0 core:copy (atom-notification.fatal.icon.icon-bug.native-key-bindings.has-detail.has-close.has-stack.remove)
-5:11.5 core:paste (atom-text-editor.editor)
3x -4:27.9 core:copy (atom-text-editor.editor)
-0:03.6 find-and-replace:show (atom-text-editor.editor.is-focused)
-0:02.0 editor:consolidate-selections (atom-text-editor.editor.mini)
-0:02.0 core:cancel (atom-text-editor.editor.mini)
-0:01.0 core:save (atom-text-editor.editor.is-focused)
Config
{
"core": {
"themes": [
"atom-dark-ui",
"monokai"
],
"useReactEditor": true
},
"editor": {
"fontSize": 11,
"showIndentGuide": true,
"tabLength": 4,
"invisibles": {}
}
}Installed Packages
# User
docblockr, v0.5.8
editorconfig, v0.3.0
emmet, v2.3.3
git-tab-status, v1.5.3
linter, v0.11.1
linter-jshint, v0.1.0
minimap, v4.2.2
monokai, v0.12.0
regex-railroad-diagram, v0.6.3
# Dev
No dev packages
Activity
skvggor commentedon Jun 29, 2015
+1
nathansobo commentedon Jul 7, 2015
Any idea where this
utf-8-bomencoding name came from? We can guard against this case but it would be good to know what's setting the editor's encoding to that.skvggor commentedon Jul 7, 2015
@nathansobo, I get the same error using editorconfig plugin (with utf-8-bom configurated): crash Atom.
mnquintana commentedon Jul 7, 2015
@Marcker So in your
.editorconfigfile you have an entry like:charset = utf-8-bom?
skvggor commentedon Jul 7, 2015
@mnquintana At the time of the error, yes.
Blow up when setting an invalid encoding in File::setEncoding
lock commentedon Jan 21, 2019
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!