Wednesday, January 2, 2008

--- In Fictionwise@yahoogroups.com, "nymbullion" <enaitee@...> wrote:
>
> Hi...Thankyou very much for an informative 
> and helpful reply.  I've downloaded that 
> program and will add it to my toolkit along 
> with a copy of your reply.  It works fine!

Many thanks!  I'm glad to be of help!  But I wrote that message in great haste, and am appalled by the typos I let creep into it.  Here's a cleaner version for posterity:

===

The small square symbol -- which is just Windows' way of showing any unknown character -- is probably ctrl-Z (1A hex), the old DOS end-of-file code.

I've uploaded a little command-line program to my website which will turn all the actual ctrl-Z characters into the two-character string "^Z" (that's a caret followed by the capital letter Z; the caret is the symbol you get if you type shift-6 on a United States keyboard). 

I can't remember who wrote this program -- someone on the old CompuServe WordStar Forum, circa 1990 -- but it does what you need.

Download:  http://sfwriter.com/noctrlz.off

Rename noctrlz.off to noctrlz.exe

Open a command prompt ("Start," then "Accessories," then "Command Prompt" on most Windows machines), and run the program like this:

C:\> noctrlz OLDFILE.TXT NEWFILE.TXT

(OLDFILE.TXT is your existing file -- the one that's giving you trouble.  NEWFILE.TXT will be a new version; your original is left untouched.)

Then you can open up NEWFILE.TXT in any text editor and remove the literal two-character "^Z" (caret-Z) strings.

By the way, the command prompt is your friend when dealing with text files.  Had you combined your files using the COPY command at the command prompt, all the internal Ctrl-Z characters would have been stripped out:

COPY /A FILE1.TXT + FILE2.TXT + FILE3.TXT COMBINED.TXT

The "/A" switch tells COPY that these are in fact DOS-style text files, and that it should not include the ctrl-Z character at the end of each one when making COMBINED.TXT, which will be a new file containing everything that was in FILE1.TXT, FILE2.TXT, and FILE3.TXT except the ^Z codes.

All best wishes.

Rob
