Replacing Carriage Returns in Document

I am the proud owner of the original manuscript of a novelette I wrote in 1979, carefully typed in 12-pitch courier on my Adler electric typewriter. That typewriter cost me $600 in 1975. I now have an iMac I bought two years ago for $2200. Probably a bargain, since the $600 in 1975 would be worth about $2700 today!

So I scanned my manuscript and ran it through an OCR program and got a text file that I imported to Scrivener. Problem is that the text file contains line feeds, not carriage returns. There is a line feed for each line of the original document. To be specific, the file contains hex character 0x0d, line feed, not 0x0a, carriage return.

Is there a way, using Scrivener, that I can remove the line feeds from the file? Ideal would be a global replace of the line feed character with a space.

I know I can search and replace carriage returns (0x0a) by using option-return to enter the character in the search field. How do I do the same for line feed? I have tried using ctrl-return and I get a cool symbol that looks like a return symbol (not a paragraph glyph), but this character is not 0x0d, but 0xe2.

I can do this replacement easily using Vim, but I’d really like a solution that doesn’t require going out to another app and then back to Scrivener.

The easiest way I know of is to copy one of the little devils and paste it into the search field. If you haven’t already tried this, it’s worth a shot.

BTW, Format > Options > Show Invisibles may make this easier.

Hope this helps!

Thanks, that does work.

However, it is interesting that when I turn on show invisibles that both the carriage returns and the line feeds show as the same symbol–the paragraph glyph. However, the search skips over the carriage returns. So, given a mixture of the two hex codes, I still need a separate application to determine which of the paragraph glyphs to copy and then use in the replace.

Funny, I never had this problem on that old Adler. However, the Adler also didn’t underline a couple of typos either!

I’d check the preferences on your OCR program – there might be a way to set the line feed character there – then you could just run the OCR with the desired settings and not need to muck about with it afterwards.

The ALT key is your friend when searching for special characters…

briarkitesme.com/2015/04/08/sea … scrivener/

This is a very useful document and is now in my How To In Scrivener Notes file.

Thanks for another very useful answer, Briar Kit.

Derick,

I did check that and found nothing useful. I use the OCR built into DevonThink Pro.

It does seem odd to me that, on a Mac, that it is using line feeds.