I’m still finding my way around Scrivener, so please excuse this possibly f. asked q.
I’m using Compile Draft to produce a .txt file. In that file I’m seeing both \n and \r as line endings. (Well, it’s been quite hard to see them but eventually I found a terminal command called hexdump which did the trick.) Is there a way to find either of those in Scrivener? They appear to be indistinguishable in ordinary use. (Obviously the problem is that subsequent processing is expecting \n rather than a mixture of \n and \r.)
I’m not aware of a way to change this in Scrivener, but you could use a texteditor (TextWrangler) to change the CRs into LFs, or a command-line utility like tr or Perl:
perl -pi -e ‘s/\r/\n/g’ filename.txt
Thanks! In fact, TextWrangler is part of the problem, since pasting text from TW was how the \r characters got into Scrivener to begin with… (TW uses \r line endings when documents are open and converts to \n only when saving.)
The utility is no problem, just an extra step…
saw your post in the Wish List forum and posted yet another workaround.