How to display and insert control characters.

General questions about using TextPad

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

Post Reply
idler
Posts: 2
Joined: Sun Jan 13, 2013 8:28 pm

How to display and insert control characters.

Post by idler »

1) I have a file with CR, LF at the end of each line. How does one display these (or any) control characters ?
I turned "visible" = backward P on, and the spaces are displayed as period (good);
and the CR or LF or both at the line end is displayed as a single strangish character (strangish is ok but only one character position is occupied for two characters).
The hover over a control character to get a pop-up description, as described in the help file, doesn't happen.
The font used is Courier New, and I'm using windows XP.

2) How does one insert a control character, e.g. ^C ... and hopefully show it as occupying one character position

thanks
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

1) Keep in mind that TextPad is a text editor. Text consists of a sequence of lines, each terminated with a line terminator. The representation in the file of the line terminator depends on the convention you are using, which is determined usually, but not always, by the platform you're working on. The representation of the line terminator has no significance as far as the logical text is concerned, and so TextPad doesn't display it explicitly. If you need to find out what it is you can examine View | Document Properties | Document | File type. PC means CR,LF line endings and UNIX means LF line endings.

Also, if in TextPad you highlight lines in a file with LF line endings the highlight extends over a single character position beyond the end of each line. If the file has CR,LF line endings the highlight extends over two character positions beyond the end of each line.

2) Do the instructions in the help under How To ... | Edit Text | Type Control Characters not work for you? What the characters look like depends on the font you're using.
idler
Posts: 2
Joined: Sun Jan 13, 2013 8:28 pm

Post by idler »

Thank you very much for the explanation and guidance.

The reason that I wanted the ability to be able to see CR and LF separately was that I often get files that have CR, LF, CRLF terminators and I want to discover character counts and quickly find the record termination flavor - I'll have to do it some other way.

The guidance to the inserting of control characters was just what I needed .
It works for most control characters - not ^J (linefeed) or ^M (CR) ... but I guess that's consistent with the treatment of line terminations.

The mouseover works somewhat - it seems to take a lot of coaxing. After finally getting a popup I need to move the cursor elsewhere, click it, and try mouseover again if I want to see more than one in a sequence...
Post Reply