I have to maintain an Delphi 7 application. I've received the source code of this app, and when I try to open .DFM file or .DCU file by Notepad++, some of them display normaly with the source code, but some of them display incorrect with strange characters. How can I recover these file I will appreciate your help
For the .DFM, you can either:
Text DFM
and then save it, or.dfm
is located, run convert <dfmfile.dfm>
, which will convert it to text format with the same name. (Convert.exe
is located in your $(DELPHI)\Bin
folder, where $(DELPHI)
refers to the root folder of your Delphi 7 installation).The .dcu
is compiled (binary) code, so to view it you need to open the .pas
file with the same name (eg., if you have Unit1.dcu
, you view it's source by opening Unit1.pas
). There's no way to view the .dcu
as text, because it isn't text.