Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: dfm file only opens as text


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Dec 8, 2017 1:20 AM Last Post By: Roy Lambert
Bruce Eglington

Posts: 34
Registered: 1/24/03
dfm file only opens as text  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 7, 2017 9:01 PM
I have a Delphi Berlin dfm file which will suddenly only open as text and I get an error message that there is a wrong identifier at line ...

How do I correct whatever the problem might be as there is no obvious error at the quoted line.

Thanks

Bruce
Peter Below

Posts: 1,227
Registered: 12/16/99
Re: dfm file only opens as text  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 7, 2017 11:30 PM   in response to: Bruce Eglington in response to: Bruce Eglington
Bruce Eglington wrote:

I have a Delphi Berlin dfm file which will suddenly only open as text
and I get an error message that there is a wrong identifier at line
...

How do I correct whatever the problem might be as there is no obvious
error at the quoted line.

Well, but there has to be a non-obvious error then, otherwise the file
would load. Did you view the form as text some time before? If you have
one available try to load the file into an external editor that can
show the content as hexadecimal (bytes), then go looking for byte
values outside the ASCII range or in the range #1..#31 with the
exception of #10 and #13 (LF and CR). Perhaps the file got damaged
somehow, by a disk problem or such.


--
Peter Below
TeamB

Roy Lambert

Posts: 1,063
Registered: 8/7/01
Re: dfm file only opens as text  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 8, 2017 1:20 AM   in response to: Bruce Eglington in response to: Bruce Eglington
Bruce

Pretty much as Peter says. I find having a look in a hex editor to help. Freebie one at https://www.hhdsoftware.com/

Its also worth just opening in text editor, eg notepad, and saving - sometimes that clears things up

Roy Lambert

Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02