前端 - windows下换行符设置为LF会存在什么问题?
为情所困
为情所困 2017-05-02 09:22:00
0
1
642

windows下默认的换行符号是CRLF, Linux和Mac通用的是LF。我在windows下将编辑器的换行模式修改为LF,不知道会带来什么潜在问题?

另外也想看看大家怎么处理不同系统之间的换行符问题?

为情所困
为情所困

reply all(1)
过去多啦不再A梦

Let me correct you first: Windows is CRLF,Linux 是 LFMac 是 CR

What to use? In fact, it doesn’t matter much. As long as the text editor supports it, you can use any line ending mark - of course "Notepad" does not support it. If you use Notepad to open a file with LF as the end character, it will There are no branches.

In addition, like Git, Windows will by default convert CRLF to LF when submitting the code before submitting it. When updating the code, it will also convert LF to CRLF to achieve system compatibility.

Of course, there is another problem that you may need to pay attention to when developing read/write (note not just reading) text files.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template