I'm looking for a text editor that can show me the actual carriage returns and newlines.
E.g. if I save this string: "This\rIs\r\nA\nString"
Instead of showing
This
Is
A
String
I'm looking for some text editor which will show
This\rIs\r\nA\nString
I believe a problem with my text-file parsing in a certain program is being caused by inconsistent newline/carriage return/both on the ends of lines.
I could just make a program which can read a file and display it with that formatting, but I figured it'd be easier if anyone knew of one that can already do it.
Thanks!
[EDIT]
Forgot to specify I'm on Windows, and installing Cygwin isn't really an option. Otherwise I would use vi or vim.
Also, if there's a way to do this in PSPad, which is already installed, it would be awesome if you knew that too. Thanks!
Open any text file and click on the pilcrow (¶) button. Notepad++ will show all of the characters with newline characters in either the CR and LF format. If it is a Windows EOL encoded file, the newline characters of CR LF will appear (\r\n). If the file is UNIX or Mac EOL encoded, then it will only show LF (\n).
In Notepad++ go to the View > Show Symbol menu and select Show End of Line. Once you select View > Show Symbol > Show End of Line you can see the CR LF characters visually.
Press Ctrl+F. Word displays the Navigation task pane at the left side of the screen. In the box at the top of the Navigation pane, enter the text for which you want to search. To search for a paragraph mark, enter ^p; to search for a line break, enter ^l.
With Notepad++, you can show end-of-line characters. It shows CR and LF, instead of "\r" and "\n", but it gets the point across. However, it will still insert the line breaks. But you do get to see the line-ending characters.
To use Notepad++ for this, open the View menu, open the Show Symbols slide out, and select either "Show all characters" or "Show end-of-line characters".
In vi(m), check out:
:help 'list'
:help 'listchars'
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