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
>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.
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
BY: Mary Westendorf <mary.we...@uni.edu>
>
>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 -*n7...@filenet.wwiv.net*-
(714) 903-9920 -* Westminster, California*-
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