Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Carriage Return showing in notepad++ but not textpad?

I have some text files copied out to a server. I typically use and prefer notepad++ to look at text files but on this server, only textpad is installed. This is really strange behavior but I noticed that when I view the EOL chars in notepad++ I can clearly see and search for the CRLF (i.e. \r\n). But when I display the same files in textpad, I am able to search only on the LF (\n) and do not have any hits on the CR (\r). Am I missing something on how Textpad is interpreting the EOL chars?

like image 654
Kimberly Ketchum Avatar asked Jun 13 '13 13:06

Kimberly Ketchum


1 Answers

This happens when the EOL control characters are not correct. Windows represents newlines with the carriage return + line feed.

In Notepad++, you can check for these characters by selecting:

View > Show Symbols > [x] Show End of Line

notepad++

You need to modify your script so your data is formatted like this:

CRLF

like image 103
Adrian Cumpanasu Avatar answered Sep 24 '22 11:09

Adrian Cumpanasu