search

Home  >  Q&A  >  body text

python - How to change a text file's CR newlines to LF newlines?

How to replace the CR newline character of a text file with the LF newline character

怪我咯怪我咯2734 days ago1399

reply all(2)I'll reply

  • 为情所困

    为情所困2017-06-28 09:27:37

    If it is a windows system, you can use Notepad instead. You should press ctrl+H (there is also a menu), a window will pop up, and then replace ^p (i.e. CR) with ^l (i.e. LF).

    reply
    0
  • 大家讲道理

    大家讲道理2017-06-28 09:27:37

    Open with Notepad++.
    Edit--"File Format Conversion--" (You can choose one of Windows-CRLF, Unix-LF, and Mac-CR)
    You need to set the display line break to see the effect. View--"Show Symbols- -》Display end-of-line characters.

    reply
    0
  • Cancelreply