Frank Nordberg wrote:

>5. Line terminators
>
>RJP wrote:
>> This file has <cr> terminated lines...
>
>I'm afraid that problem is a bit beyond me. As far as I know, SaintEdit
>is the only Macintosh text processor that allows you to specify line
>terminators, and I don't fancy opening each and every Musica Viva
>document in SaintEdit before uploading.
>
>Any suggestions for solving this?

You can do it in BarFly, but only one document at a time.  In the replace
dialog you can represent any character by means of a bullet mark (option-
8) followed by the numerical ascii value of that character.  The CR
character is 13 and the LF is 10.  So, if you want to convert to convert
a Mac format file (CR) to a PC format file (CRLF) you open the file,
place the insertion point at the very start, choose Replace Text...
from the Edit menu, and enter *13 in the "Search for" box and *13*10
in the "Replace with" box.  (The bullet mark may not survive emailing,
but that's what the character before the number is.)  Check the "Replace
all" box and hit OK.  The document will then appear to be double-spaced,
as BarFly's editor treats both CR and LF as valid end of line markers.
Save it immediately without touching anything else.  Remember that if
you open that file again in BarFly it will be converted back to Mac
format if you save it.  If you want to format your files for Unix rather
than PC use *10 in the "Replace with" box in place of *13*10.

If this is likely to be a common requirement I might add a popup menu
to the save dialog to let you simply save the file with various line-
termination options.  I think most of the heavyweight Mac text editors
BBEdit, Alpha, the CodeWarrior IDE editor, already have this option.

I once wrote a drag-and-drop application to do this kind of thing on
bulk files, but it was a long time ago and would probably require a
major archaeological dig to find it.

Phil Taylor


To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html

Reply via email to