atom / encoding-selector

Pick an encoding for the current editor
MIT License
21 stars 26 forks source link

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

Open willamowius opened 9 years ago

willamowius commented 9 years ago

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

utensil commented 9 years ago

:+1: 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.

davmrtl commented 9 years ago

:+1: It would be a great feature

tinymins commented 9 years ago

+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?

ghost commented 9 years ago

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

jhasse commented 9 years ago

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

ujay68 commented 8 years ago

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.

mass10 commented 8 years ago

👍

natinusala commented 8 years ago

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

mconrado commented 8 years ago

I try to encourage all my workmates to use Atom but problems with encoding avoid them. Vide too: https://github.com/atom/encoding-selector/issues/8

andreassjoberg commented 8 years ago

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

tinymins commented 8 years ago

https://github.com/atom/atom/pull/12127 https://github.com/atom/encoding-selector/pull/34

bohning commented 8 years ago

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.

cheesecracker commented 7 years ago

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

schiavoni commented 7 years ago

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.

fernandoff commented 7 years ago

already losted a few hours of work because of this

liwangqian commented 7 years ago

add vote for auto-detect encoding.

grivasgervilla commented 7 years ago

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.

winstliu commented 7 years ago

I am working on this.

pmgouveia commented 7 years ago

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

winstliu commented 7 years ago

The PRs are open (https://github.com/atom/atom/pull/13943, https://github.com/atom/node-pathwatcher/pull/120, https://github.com/atom/text-buffer/pull/220, https://github.com/atom/encoding-selector/pull/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.

tinymins commented 7 years ago

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

lipeng1667 commented 7 years ago

This package saved me. https://atom.io/packages/auto-encoding

grivasgervilla commented 7 years ago

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

MissAllSunday commented 7 years ago

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

irudoy commented 7 years ago

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.

LeandroBarone commented 7 years ago

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

burtonsys commented 7 years ago

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.

chrilith commented 7 years ago

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

buggymcbugfix commented 7 years ago

Still no fix?

petrasteri commented 7 years ago

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 7 years ago

Just met the problem. Very frustrating.

migs911 commented 7 years ago

@petrasteri VS Code has many other problems.

MissAllSunday commented 7 years ago

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.

petrasteri commented 7 years ago

@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.

chemage commented 6 years ago

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

petrasteri commented 6 years ago

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.

grodrigo commented 5 years ago

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 5 years ago

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.

BitGrub commented 4 years ago

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