Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to "save with encoding"

Tags:

I have csv file in UTF-8 and I want to save it in Cyrillic (Windows 1251) ... in Atom I found only - reopen with encoding ctrl+shift+u

In Sublime Text 3 there is "File -> Save with Encoding" - is there any alternatives in Atom ?

like image 389
madzohan Avatar asked Oct 17 '15 23:10

madzohan


People also ask

How do I save a file with encoding?

To save a file with encodingFrom the File menu, choose Save File As, and then click the drop-down button next to the Save button. The Advanced Save Options dialog box is displayed. Under Encoding, select the encoding to use for the file. Optionally, under Line endings, select the format for end-of-line characters.

How do I save a UTF-16 file?

Open the file you just saved and you'll see "UTF-16 Unicode Text" as the selected option in the "File -> Save As..." dialog. If you "File -> Save" then the contents of the ". csv" file are what you'd get if you saved it as "UTF-16 Unicode Text".

How do I save encoding in Notepad ++?

Open the file you want to verify/fix in Notepad++ In the top menu select Encoding > Convert to UTF-8 (option without BOM) Save the file.


2 Answers

Another option, without using any plugin: cut all text from file, then switch to the target encoding (Ctrl-Shift-U) in an empty editor and paste the text back.

As seen in https://github.com/atom/encoding-selector/issues/7#issuecomment-274257654

like image 106
manavi Avatar answered Oct 12 '22 01:10

manavi


Recently there is a plugin written for this: Convert-file-encoding

To use the plugin, press Ctrl+Shift+P, type Convert File Encoding to search for the function and select the encoding you want the file convert into.

like image 35
cytsunny Avatar answered Oct 12 '22 03:10

cytsunny