Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between encode and convert in Notepad++?

The Encoding menu has submenus of Encode in utf-8 and Convert to utf-8 in Notepad++. What's the difference between them?

like image 686
Double Avatar asked Sep 26 '14 04:09

Double


People also ask

What does encoding mean in Notepad?

+7. Encoding means that you are going to convert something into a code.

What does it mean to encode a text?

Decoding is the ability to apply your knowledge of letter-sound relationships, including knowledge of letter patterns, to correctly pronounce written words.

What does it mean to encode files?

Encoding is the process of converting data into a format required for a number of information processing needs, including: Program compiling and execution. Data transmission, storage and compression/decompression. Application data processing, such as file conversion.


1 Answers

Short version:

  • Encode in keeps the bytes, and modifies the characters.
  • Convert to keeps the characters, and modifies the bytes.

Encode

Encode in ... specifies how bytes are interpreted. Example:

Create new file UTF-8 (no BOM), and insert character ä. File will contain bytes C3 A4. If you select Encode in ANSI, you will see 2 different characters, but underlying bytes are still the same C3 A4.

Note that sometimes byte sequence is invalid in selected encoding, and Notepad++ might have to change it.

You usually use Encode in ... if Notepad++ guesses the file encoding incorrectly.

Convert

Convert to ... tries to keep the text content same, but changes the underlying bytes. Example:

Create new file UTF-8 (no BOM), and insert character ä. Select Convert to ANSI, and character will remain the same ä, but bytes have changed to E4. (If character set was ISO 8859-1.)

You usually use conversion if you want to change the file encoding, for example, to make file compatible with some other program.

like image 52
user694733 Avatar answered Oct 19 '22 16:10

user694733