Convert text files to use new lines instead of boxes

  • Thread starter Thread starter Ben Wylie
  • Start date Start date
B

Ben Wylie

I have a lot of text files which where it should be a new line it has a
funny box character, when opened in notepad.
When opened in wordpad, these display normally.
What i'd like is to convert these files so that they would display normally
in notepad, converting the box into an actual 'return'.

Some of these files are really large, I'm not doing this so they display
correctly in notepad, but because i want the software reading it, to read it
correctly.

Thanks for your help.

Ben
 
I have a lot of text files which where it should be a new
line it has a funny box character, when opened in notepad.
When opened in wordpad, these display normally.
What i'd like is to convert these files so that they would
display normally in notepad, converting the box into an
actual 'return'.

Some of these files are really large, I'm not doing this so
they display correctly in notepad, but because i want the
software reading it, to read it correctly.

Thanks for your help.

Ben
If you have Zip / UnZip by Info-ZIP, look at options
"-l" and "-ll"

J
 
Olaf said:
have a look at programs like:
CRLF Text converter Unix->Windows
from http://www.wischik.com/lu/programmer/crlf.html

There used to be a program called crlf.exe around that does the
conversion from and to, too.

Thanks for the link.
There are two programs there, one which just intercepts when you try to open
a file which uses the unix style, which works, but you have to tell it each
type of file it should test for, and there is the file you replace notepad
with, which is ideal, but doesn't seem to work - it still opens the files in
the incorrect format and doesn't change it ... oh well!

Cheers,
Ben
 
I have a lot of text files which where it should be a new line it has a
funny box character, when opened in notepad.
When opened in wordpad, these display normally.
What i'd like is to convert these files so that they would display normally
in notepad, converting the box into an actual 'return'.

Some of these files are really large, I'm not doing this so they display
correctly in notepad, but because i want the software reading it, to read it
correctly.

Thanks for your help.

Ben

You could download Win32Pad
http://www.gena01.com/win32pad/

It can convert to & from DOS/WIN, MAC & UNIX file format (but only 1
file at a time, I think).

Manuel
 
I have a lot of text files which where it should be a new line it has a
funny box character, when opened in notepad.
When opened in wordpad, these display normally.

< snip >

Then wouldn't "save as"

Text Document

or

Text Document MS DOS Format

fix things up ?

Regards, John.
--
****************************************************
,-._|\ (A.C.F FAQ) http://clients.net2000.com.au/~johnf/faq.html
/ Oz \ John Fitzsimons - Melbourne, Australia.
\_,--.x/ http://www.vicnet.net.au/~johnf/welcome.htm
v http://clients.net2000.com.au/~johnf/
 
Ben Wylie wrote in said:
I have a lot of text files which where it should be a new line it has a
funny box character, when opened in notepad.
When opened in wordpad, these display normally.

There are many ways, from "Save As" (use plain/dos/ascii text option),
to single file search/replace (search for <LF> replace with <CR/LF> or
whatever) with a decent text-editor. Or for multiple files you could
use a search/replace utility that will perform the search/replace
operations on as many files as you like in one go (some editors can do
that as well). Browse
<http://www.pricelesswarehome.org/2005/PL2005FILEUTILITIES.php#SearchAndReplace>
for suggestions.

Then there are special text formatting utilities that might do the
trick in your case, such as
<http://www.cublea.net/pbp/software/quicktexttools/> with an option to
convert all UNIX style linebreaks (LF) to DOS/WINDOS linebreaks
(CR/LF) in multiple files.

If you prefer CLI (Command-Line-Interface) applications over
over GUI (Graphical-User-Interface) - there are many such CLI
formatting and/or search/replace utilities around. Examples of the
latter kind is GSAR from <http://home.online.no/~tjaberg/> and
MINITRU <http://www.idiotsdelight.net/minitrue/>

All the best,
Bjorn Simonsen
 
Bjorn Simonsen wrote in said:
There are many ways,

Let me just add: I use PFE (see 1) for this when I need to edit/change
only one or a few files. Nice thing is I don't need to know what those
little black boxes represents (LF, a TAB stop, some other control
character, other special characters,foreign characters). I just copy
one of those little black boxes (making sure I only copy the "box" and
not any space before/after) to the clipboard and insert it in the
the "Find What" field in PFEs replace dialog (EDIT MENU -> REPLACE),
then insert whatever I like in the "Replace With" field: for example -
for a linebreak (see 2) - where PFEs special notation (see 3 and 2)
for a linebreak is "\n" - for "newline", I insert \n in the "Replace
With" field, and press the "Replace All" button.

If I have several files to edit this way (but not many, then I use a
search/replace utility) I might open them all at once, do them one by
one - never closing the search/replace dialog, just close each
document window when done with it and confirm save changes when
prompted, then continue on the next open document window until all
done.

Footnotes:

(1)Download link for PFE
<http://www.download.com/3000-2352-904159.html>
Description:
<http://www.pricelesswarehome.org/acf/programs/0587-PW.php>

(2) <http://www.answers.com/topic/line-feed>
<http://en.wikipedia.org/wiki/Line_feed>

(3) For PFEs special notation, click the HELP button while in the
replace dialog and click the Special Notation link there,
and you will find:

"To represent characters that you can't type in the Edit Find and
Edit Replace dialogs, and in the search string specified in the
EditFind() DDE command, use this notation:

\f represents a Form Feed character
\t represents a TAB character
\n represents the end of a line
\\ represents a single '\' character

To represent an arbitrary character code, use the notation
"\xnn", where "nn" represents two hexadecimal digits. The null
value "\x00" is not permitted."


All the best,
Bjorn Simonsen
 
Thanks for all of your advice.
I hadn't realised that if you open in wordpad and save it changes the
format... i tried all sorts of other complicated mechanisms, but this was
much simpler ... does mean i had to do each file individually, but
fortunately i only had about 15 rather then 15,000 files.

Cheers,
Ben
 
"Ben Wylie" <benwylie@_hotmail_.com> wrote:
Thanks for all of your advice.
I hadn't realised that if you open in wordpad and save it changes the
format... i tried all sorts of other complicated mechanisms, but this was
much simpler ... does mean i had to do each file individually, but
fortunately i only had about 15 rather then 15,000 files.

It looks like you have it under control. If you ever need to repair
15,000 files check this utility I wrote:

http://home.inu.net/branded/

The text must be in paragraph form though...

I used to save text stories from various groups and needed a utility
to make several adjustments.
 
Thanks for the link.
There are two programs there, one which just intercepts when you try to open
a file which uses the unix style, which works, but you have to tell it each
type of file it should test for, and there is the file you replace notepad
with, which is ideal, but doesn't seem to work - it still opens the files in
the incorrect format and doesn't change it ... oh well!

Cheers,
Ben

You might try looking on the net for a file called textcon.exe.
I used to have it in the days of Fidonet. It's a commandline utility
where one would type:

textcon "input file" > "output file"

Filenames eight characters of less.
 
Back
Top