I have a file in UTF-8 and I need to convert it to iso-8859-1. I know notepad++ can convert encoding, you click on convert to ANSI for example, and you have your file modified, you can see it by the save button that became red. I understand that converting is to change bytes and that's what I want ! But I don't know how to select the encoding I want in notepad++. There is only 5 encoding to choose from : ANSI; UTF-8 without BOM; UTF-8; UCS-2 Big Endian; UCS-2 Little Endian. How do I choose another one ?
Say you have a file enc_test.txt, created as UTF-8 with the content Ä
(German Umlaut "A" with points):
Before step 1:
cat -A enc_test.txt
M-CM-^D
cat enc_test.txt
Ä
stat enc_test.txt
File: 'enc_test.txt'
Size: 2 Blocks: 8 IO Block: 4096 regular file
Device: 811h/2065d Inode: 2885375 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1000/ lf) Gid: ( 1000/ lf)
Access: 2016-05-20 16:56:40.852021989 +0200
Modify: 2016-05-20 16:56:40.376021976 +0200
Change: 2016-05-20 16:56:40.376021976 +0200
Birth: -
After step 2 (file is saved automatically) the output (in an terminal which is set to UTF-8) is:
cat -A enc_test.txt
M-D
cat enc_test.txt
?
stat enc_test.txt
File: 'enc_test.txt'
Size: 1 Blocks: 8 IO Block: 4096 regular file
Device: 811h/2065d Inode: 2885375 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1000/ lf) Gid: ( 1000/ lf)
Access: 2016-05-20 16:58:10.444024488 +0200
Modify: 2016-05-20 16:58:10.404024487 +0200
Change: 2016-05-20 16:58:10.404024487 +0200
Birth: -
The size field and the output of cat -A
tells us that something has happened.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With