atom / encoding-selector

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

Add Windows 874 encoding for supporting Thai language #66

Open icyzyy opened 5 years ago

icyzyy commented 5 years ago

Requirements

Description of the Change

Add Windows 874 encoding to selector list

Alternate Designs

Use another editor to convert file and save. Then reopen in Atom

Benefits

Support old Thai language projects

Possible Drawbacks

I don't see any possible drawback

Applicable Issues

https://github.com/atom/encoding-selector/issues/41

Arcanemagus commented 5 years ago

This simply adds the encoding to the selector, does the rest of Atom actually support working with the encoding?

icyzyy commented 5 years ago

This support only opening file. Is this package effect in any other part of Atom?

Arcanemagus commented 5 years ago

This package is just a UI for calling TextEditor::setEncoding, it doesn't actually do anything itself.

The TextEditor (and all the underlying code, such as superstring) need to understand the encoding before adding it here makes any sense.

icyzyy commented 5 years ago

I have looked into encoding-coversion in superstring. it use iconv for encoding, and I have checked iconv for supported encoding and there is Windows 874 (CP874) there. So it should know this encoding.