Closed alefragnani closed 10 years ago
I think it makes sense to add a default encoding to the config, see atom/atom#4141 for more details.
Please don't close this. A default encoding config is not the same as encoding detection. Atom should try to guess the encoding as best as it can and only if it fails, fallback to the default encoding. @kevinsawicki
The issue is the quality of detection libraries, there didn't seem to be one that correctly guessed the desired encoding using the examples from the original issue, https://github.com/atom/atom/issues/1806
There is an auto-detect option in the encoding selector dialog that can be used to try to guess when needed.
IMHO, missing library shouldn't be a factor in this issue. If there isn't one, it should be created or maybe patch the one that could get the job done.
The main issue with Atom is that it will try to open files in UTF8 (or the default encoding, if set), which will potentially break any non-UTF8 files. And that, imho, is not an acceptable behavior for any editor. This should be tagged as 1.0 blocker.
Also, maybe this could help:
@kevinsawicki Should I understand that this bug is not going to be reopened or did you just miss my comments?
Should I understand that this bug is not going to be reopened
I'd prefer to start a new issue on atom/atom to track this. If auto-detect on open is added, it will have to be done in core since that is where the buffer's are built. This package just handles changing the encoding after the editor is opened via the Editor::setEncoding
API.
Would you mind opening an issue there? It will have more visibility than this package repo which few people are probably watching since it is relatively new.
@kevinsawicki Ok, I'll open a new bug in /atom
It would be interesting that it would detect the encoding, instead of just allow us to select a new one. Or at least have a default encoding value.
It always opens as UTF-8, but most of the files that I use are Windows 1252 / ISO 8859-1, so I have to manually change every file.
Thanks