Board index » delphi » Converting Turbo Pascal file to ASCII or text

Converting Turbo Pascal file to ASCII or text

I have an old turbo pascal file which is unpacked.  I need to convert this to a
text or ascii file so that I can upload it to a new system.  I can see the data
in the file, but it is surrounded with unreadable characters.  Any ideas on how
to do this?  Once I get it in a flat file format, I can then figure out what the
data is. I really need the data to be column aligned if possible, or delimited
by a character. Thanks
Mary westendorf
 

Re:Converting Turbo Pascal file to ASCII or text


Quote
"Mary Westendorf" <mary.westend...@uni.edu> wrote in message news:3C0679A3.A4876AB5@uni.edu...
> I have an old turbo pascal file which is unpacked.  I need to convert this to a
> text or ascii file so that I can upload it to a new system.  I can see the data
> in the file, but it is surrounded with unreadable characters.  Any ideas on how
> to do this?  Once I get it in a flat file format, I can then figure out what the
> data is. I really need the data to be column aligned if possible, or delimited
> by a character. Thanks
> Mary westendorf

This question looks familiar.  I'm guessing you're talking about a data file that
was written and read  by a Turbo Pascal program but you don't have the source
code for that program, correct?

I'm guessing the unreadable characters in your data are numeric values interspersed
among text strings.  The text strings will display normally but the numerics will come
out as odd, unreadable characters.

What do you mean by "flat file" format?  That's a database term and many Pascal
"databases" are already "flat file".

Also, look in the groups.google.com for postings on possibly this same subject.

Rufus

Re:Converting Turbo Pascal file to ASCII or text


On Thu, 29 Nov 2001 12:08:35 -0600, Mary Westendorf

Quote
<mary.westend...@uni.edu> wrote:
>I have an old turbo pascal file which is unpacked.  

Do you know what is in the data file?  If so, it might not be too hard
to figure it out.

Re:Converting Turbo Pascal file to ASCII or text


JRS:  In article <3C0679A3.A4876...@uni.edu>, seen in
news:comp.lang.pascal.borland, Mary Westendorf <mary.westend...@uni.edu>
wrote at Thu, 29 Nov 2001 12:08:35 :-

Quote
>I have an old turbo pascal file which is unpacked.  I need to convert this to a
>text or ascii file so that I can upload it to a new system.  I can see the data
>in the file, but it is surrounded with unreadable characters.  Any ideas on how
>to do this?  Once I get it in a flat file format, I can then figure out what the
>data is. I really need the data to be column aligned if possible, or delimited
>by a character. Thanks

IIRC, the keyword PACKED had no effect in any version of Turbo Pascal.

You can get old versions of the language from the Museum; see c.l.p.b
mFAQ.  If you have the source that generated the file, it could be easy
to use that to help read it and rewrite it.

Delphi will read it, using packed records of suitable types.

But there are so many possibilities compatible with your description;
you would do best to talk it over with a local programmer, in front of a
computer, and sort it out that way.  The clues you can give as to
meaning will help the programmer extract fields and gain increased
understanding.

Do you need the whole data?  If you only need the legible parts, it will
be much easier.

--
? John Stockton, Surrey, UK.  j...@merlyn.demon.co.uk   Turnpike v4.00   MIME. ?
 <URL: http://www.merlyn.demon.co.uk/> TP/BP/Delphi/&c., FAQqy topics & links;
 <URL: http://www.merlyn.demon.co.uk/clpb-faq.txt> Pedt Scragg: c.l.p.b. mFAQ;
 <URL: ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip> Timo Salmi's Turbo Pascal FAQ.

Re:Converting Turbo Pascal file to ASCII or text


RE: Converting Turbo Pascal file to ASCII or text
BY: Mary Westendorf <mary.westend...@uni.edu>

Quote

>I have an old turbo pascal file which is unpacked.  I need to convert this to
>text or ascii file so that I can upload it to a new system.  I can see the dat
>in the file, but it is surrounded with unreadable characters.  Any ideas on ho
>to do this?  Once I get it in a flat file format, I can then figure out what t
>data is. I really need the data to be column aligned if possible, or delimited
>by a character. Thanks
>Mary westendorf

Mary,

From your description it sounds like you have ONLY the DATA file.

Without the source of the program that created it, it is almost impossible to
convert it to another format (ASCII Delimited).

If you have the source to the program that created it, it is possible to create
a converter that would convert it for you.

Good luck!

Art Johnston

--- Gated via The Abyss BBS -*n...@filenet.wwiv.net*-
    (714) 903-9920 -* Westminster, California*-

Re:Converting Turbo Pascal file to ASCII or text


It sounds like you have a data file which is unrelated to TP. It really doesn't
matter what language was used to create the file. What you need to know is the
format the original programmer used. Those unreadable characters could be anything
from tabs, lf, cr, etc to special delimiters unique to the program that wrote the
file.

I would look for a repeating pattern which might indicate a structure. Then write a
simple program in whatever language you are familiar with to read the structure into
a simple record structure. Examine the result and see if you can make out data
fields and then add  add these to the record. You should be able to zero in on your
data. Its just a matter of how much time and trouble its worth.

good luck

frank

Quote
Mary Westendorf wrote:
> I have an old turbo pascal file which is unpacked.  I need to convert this to a
> text or ascii file so that I can upload it to a new system.  I can see the data
> in the file, but it is surrounded with unreadable characters.  Any ideas on how
> to do this?  Once I get it in a flat file format, I can then figure out what the
> data is. I really need the data to be column aligned if possible, or delimited
> by a character. Thanks
> Mary westendorf

Other Threads