atom/encoding-selector

Default encoding can't be set to 'auto-detect'

willamowius opened this issue ยท 39 comments

The 'Default file encoding' in the preferences doesn't have 'auto-detect' as a choice.

๐Ÿ‘ for this issue. It's very inconvenient to select the encoding for every file in a project which uses a different encoding from other projects.

๐Ÿ‘ It would be a great feature

+1 I have lua file in GBK encoding and py file in UTF-8 encoding in the same project. Every time I switch files, I need to change the encoding by ctrl+shift+u and select Auto Detect. Why not auto run encoding detect when open file?

detectEncoding such as the one in encoding-selector atom/text-buffer#86

Any news on this? It's a pity always having to select "Auto Detect" manually after Atom opens a file.

When editing well-formed XML files, a tool should definitely detect and also enforce the encoding. Not doing that brings a very high risk of producing a non-wellformed XML file in an edit. If you regard an XML editor like Atom as an XML processor, it even violates the XML specification. See also atom/atom#10052 (closed, sadly). IMO, if Atom forces the user to manually select the encoding of every XML file you edit (and every time you open it?), that makes Atom close to unusable for XML editing in many project settings.

๐Ÿ‘

+1, this is very annoying and breaks all special characters when I save without paying attention

I try to encourage all my workmates to use Atom but problems with encoding avoid them. Vide too: #8

Voting for this issue, to run "Auto detect" automatically when opening a file.

My vote for this issue as well, in my eyes it is essential and I have to use a different editor until this is fixed. Manually selecting the non-default enconding is tiresome. I literally have destroyed dozens, if not hundreds of files due to this.

It would be really great to see this feature soon.

Atom is perhaps a hackable text editor for the 21st Century, but unable to support different encoding is most certainly a 20th Century feature.

Sublime and Notepad++ have no problems with that. Open files with correct encode and shows in status bar with option to convert if needed/wanted. A realy desirable feature for the 21th century editor.

already losted a few hours of work because of this

add vote for auto-detect encoding.

Add vote for this feature. When I open a iso-8859-1 Atom reads it like an UTF-8 file, but if a I choose auto-detect encoding then it reads it find. So if we can set auto-detect as default encoding can be more confortable.

I am working on this.

any news or commit on this? any workaround with a plugin? I tried https://atom.io/packages/default-encoding but I can't find how to create the config file

The PRs are open (atom/atom#13943, atom/node-pathwatcher#120, atom/text-buffer#220, #42), but haven't been reviewed yet. Most of the Atom team is very busy working on performance improvements or other initiatives right now though, so I'm content to wait for those improvements to ship first before getting my PRs reviewed.

So, anywhere to download and install available dev builds? I want to have a try.

Thanks @lipeng1667, very useful. I'm still looking forward this option build-in.

Landed here after spending a few hours searching for a solution, thank you for the package link, indeed it is useful but as many others have pointed out, it would be wonderful if this was added by default

Such a claimed feature and still not implemented. After two years of waiting, I have finally switched to VS Code, and I don't regret it.

I seriously can't believe Atom can't autodetect encoding. I broke many files before realizing this. I'm going back to Sublime.

You're more patient that I was, irudoy. I also switched to VS Code. The encoding-detection / file-trashing problem was the fatal flaw, for me.

VS Code is not perfect. The 32-bit version crashed about once a day, which was disconcerting, though it usually recovered nicely, and I rarely lost more than a few characters of typing. But it is getting better. I installed the 64-bit version about 2.5 weeks ago, and it hasn't crashed since then.

Same for me :( I broke many files before realizing this too...

Still no fix?

Ditch Atom.

It's clear that juggling among different encodings is out of Atom developers' reach. So why ask for something that will never come?

Install Visual Studio Code (https://code.visualstudio.com/) which is a lot better but using the same engine as Atom. And most of all, encoding detection/switching works!

Li-An commented

Just met the problem. Very frustrating.

@petrasteri VS Code has many other problems.

A couple of months later and Atom has been replaced by Sublime 3. It is really a shame. A company like github that fancies itself for its internationalization cannot provide a feature that will really really help out those of us using different encodings. I understand the whole "full utf8 everywhere" approach and I concur but for people living on, um lets call them "sub-developed" countries, the whole utf8 dream is still pretty far away and it will take years for us to move legacy projects to utf8.

@migs911

VS Code has many other problems.

Nothing is perfect. We are not in the childish game "I'm the best. I'm more perfect than you".

It's all a matter of "what suits you best" and take the pros and cons.
If Atom is good for all you need, I'm glad for you. For those of us who have expressed our opinions, it's because encoding-selection is more important than other features / bugs.

As far as I'm concerned, lack of encoding selection has already screwed a file of mine and I'm better off working with Notepad then with Atom.

Hi.
Still seems to be an issue in v. 1.29.0 x64 and encoding-selector 0.23.9.
What's the status?

When GitHub was independent, the bug was not fixed despite its "old age".
Now that GitHub is owned by Microsoft, those Microsoft-haters would probably use it as an excuse to delay the fix.
So, better look away. Time is precious. Life is precious. Don't waste your time to wait.

wow, this is really annoying, this problem exists since 2014! and nothing changed.
SOLUTION:
apm install auto-encoding

I have a legacy system, with windows1252 coding, I plan to migrate it to utf-8, but if the editor changes the coding it would be good to let me know ... especially if it is not going to change correctly.

Unfortunately, some users have switched to another editor, why is not autodetect default behavior? It does not make sense and it made me break files and waste time until I realized that it was a my editor.

The autocoding package detects the charset correctly when the file is opened, really thank you very much!!!! but many users will continue to have problems, please make the default behavior.

N0x1k commented

I really liked Atom, but this (as well as couple of other issues) was the last drop and I switched to VS Code. Couldn't be happier with it, so so long and thanks for all the fish.

Incredible that Atom is still lacking this basic functionality after so many years