Page 1 of 1

CR and LF display?

Posted: Thu Apr 16, 2015 9:37 am
by terrypin
Could someone explain the significance of the following please.

Files in Notepad++ show CR and LF as distinct characters. But TextPad shows CR and CRLF the same, as one symbol. So I would not see the distinction while editing in TextPad.

Image


This arose when editing .M3U playlist files, when I noticed in Notepad++ that some entries ended with CR and other with CRLF. I'm unclear what if any relevance this might have on the behaviour of the files in a music player. I'll test, but would appreciate some insight into this topic please.

--
Terry, East Grinstead, UK[/img]

Posted: Fri Apr 17, 2015 7:53 am
by nvj1662
If editing a text file in Textpad it seems that inserting 0x0010 or 0x0013 causes a 0x0013 0x0010 pair to be inserted into the file.

You can open a file into a hex view from within Textpad:
From the File menu, choose Open. The File Open dialog appears.
Select the file to open.
Click the down arrow next to the File Format box.
Choose "Binary" from the drop-down list.
Click OK.

HTH

Posted: Fri Apr 17, 2015 8:27 am
by terrypin
Thank you, that's helpful.

I also posted in the Notepad++ forum. Here's the thread:

https://sourceforge.net/p/notepad-plus/ ... /72c8444f/

--
Terry, East Grinstead, UK

Posted: Sat Apr 18, 2015 7:06 am
by MudGuard
nvj1662 wrote:If editing a text file in Textpad it seems that inserting 0x0010 or 0x0013 causes a 0x0013 0x0010 pair to be inserted into the file.
it depends on the settings in the document class (Create new files as PC / Unix / MAC) - PC has CRLF, Unix LF only, MAC CR only.

You can also determine this in the Save or Save As dialog (File Format setting)

AFAIR if you open an existing file, Textpad saves it per default with the same line endings it found in the file.

Posted: Mon Apr 20, 2015 6:55 pm
by terrypin
Thanks MudGuard, understood.