Monday, October 6, 2014

Atypical ASCII Line Breaks

WOW!  Bet I got your attention with that title!

This is a geekish post with real-world application to those importing transcripts into Visionary software.

I just received a support request that included this piece of information "This transcript does not use typical line break ASCII characters. "

I've seen enough of these to know that the issue is caused by the End Of Line (EOL) character(s).

In the PC (Windows) world, all text files are supposed to use two (non-printing) characters to signal the end of a line.  Those two characters reflect the old type-writer days (those of you too young to remember type-writers can skip past this explanation).  When the end of a line was reached on a type-writer, you returned the carriage to the first column and rolled the platen up one (or more) lines.  This passed into the personal computer world as "Carriage Return" and "Line Feed" or CR/LF to indicate the end of a line.

However, there are some groups that do not use this standard.  They follow the old unix way (shout out to my old Unix SysAdmin buddies).  These groups only use one character; the Carriage Return, to indicate the EOL.

This is what that looks like:



(I happen to use a program called Notepad++ that I have set to display all characters; that is why I can see the EOL's (and little dots for all the spaces).  Here is a link to the home page of this free - as in beer - software:  http://www.Notepad-plus-plus.org.)

And there you have the problem.

Have a great day out there.

Questions? Answers - Support@VisionaryLegal.com

chuck


What?  Are you still reading?

OK, you know who you are and you want a solution.

Well, using Notepad++, choose Search, Replace.

In the Replace tab enter (without the quotes) "\r\r\n" in the Find What field and "\r\n\r\n" in the Replace With field.  Click the radio button for Extended (\n...) and click the Replace All button.

When it finishes, all the single CR's will have been replaced by the more appropriate CRLF combination.

Of course at this point you are staring at a transcript that is double-spaced, so you can clear that with one more Search and Replace operation using "\r\n\r\n" and "\r\n".  Click the Replace All button a couple times until there are no more replacements.

Just like voting; save early and save often.

crb





No comments:

Post a Comment