I believe that when you open some files in windows, the text is accumulated together and the sentences are filled with a black rectangle. In fact, this is a problem caused by different operating systems with different line breaks, I once wrote a simple small program to convert these files into a normal line feed file. The source code is available for you to download from the resource. So why is this problem? The following explains the cause.
A long time ago, old-fashioned telex typewriter was used as an input device.
Two characters to start a new line. One character moves the slide Frame back to the first place (called carriage return,
<CR>
), Another character moves a line (called line feed,
<LF>
).
After the advent of computers, memory was once very expensive. Some people think that there is no need to use two characters to represent the end of the line. Therefore, Unix developers decide that they can use
<Line Feed>
A character to indicate the end of a line. Apple developers have defined
<CR>
. Those who develop MS-DOS (and Microsoft Windows) decide to keep old-fashioned
<CR>
<LF>
. The format of the end of the three rows is as follows:
UNIX
<LF>
DoS
<CR>
<LF>
Mac
<CR>
This means that if you try to move a file from one system to another, you have trouble with line breaks.
UE troubles: every time you edit a file, you are prompted to convert it to DOS format
Cancel prompt
If your program needs to be in Unix/Linux in the future, it is best to maintain the Unix format.
Click "advanced"> "configuration"> "File Processing"> "dos/Unix/mac". Under the UNIX/MAC file detection/conversion on the right,
Disabled. Are you sure you want.
Two characters to start a new line. One character moves the slide Frame back to the first place (called carriage return,
<CR>
), Another character moves a line (called line feed,
<LF>
).
After the advent of computers, memory was once very expensive. Some people think that there is no need to use two characters to represent the end of the line. Therefore, Unix developers decide that they can use
<Line Feed>
A character to indicate the end of a line. Apple developers have defined
<CR>
. Those who develop MS-DOS (and Microsoft Windows) decide to keep old-fashioned
<CR>
<LF>
. The format of the end of the three rows is as follows:
UNIX
<LF>
DoS
<CR>
<LF>
Mac
<CR>
This means that if you try to move a file from one system to another, you have trouble with line breaks.
UE troubles: every time you edit a file, you are prompted to convert it to DOS format
Cancel prompt
If your program needs to be in Unix/Linux in the future, it is best to maintain the Unix format.
Click "advanced"> "configuration"> "File Processing"> "dos/Unix/mac". Under the UNIX/MAC file detection/conversion on the right,
Disabled. Are you sure you want.