Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Correctly detect the encoding or be able to use a default value while opening. #3

Closed
atom/atom
#4141

Description

@alefragnani

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

Activity

  1. self-assigned this
    on Nov 11, 2014
  2. kevinsawicki commented on Nov 11, 2014

    @kevinsawicki
    Contributor

    I think it makes sense to add a default encoding to the config, see atom/atom#4141 for more details.

  3. alexandernst commented on Nov 11, 2014

    @alexandernst

    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

  4. kevinsawicki commented on Nov 11, 2014

    @kevinsawicki
    Contributor

    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, atom/atom#1806

    There is an auto-detect option in the encoding selector dialog that can be used to try to guess when needed.

  5. alexandernst commented on Nov 11, 2014

    @alexandernst

    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.

  6. alexandernst commented on Nov 12, 2014

    @alexandernst

    @kevinsawicki Should I understand that this bug is not going to be reopened or did you just miss my comments?

  7. kevinsawicki commented on Nov 12, 2014

    @kevinsawicki
    Contributor

    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.

  8. alexandernst commented on Nov 12, 2014

    @alexandernst

    @kevinsawicki Ok, I'll open a new bug in /atom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions