CR and LF display?

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
terrypin
Posts: 172
Joined: Wed Jul 11, 2007 7:50 am

CR and LF display?

Post 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]
nvj1662
Posts: 53
Joined: Thu May 17, 2007 10:02 am

Post 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
terrypin
Posts: 172
Joined: Wed Jul 11, 2007 7:50 am

Post 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
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post 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.
terrypin
Posts: 172
Joined: Wed Jul 11, 2007 7:50 am

Post by terrypin »

Thanks MudGuard, understood.
Post Reply