ertank 27 Posted November 6, 2022 Hello, There is a project that I have problem loading with Delphi 10.4.2. Main form is not loaded and Structure has below error line in it E2029 Declaration expected but end of file found at line 1 (1:1) I checked the DFM and PAS files using text editor and also hex editor. Both seems fine to me. Only thing is PAS file is UTF8 with BOM and that is not a problem at all. BOM bytes are also correct (ef bb bf). Unit file begins as following second line with a remark DFM file begins as following Project is from a private subversion repository. I checkout that repository as fresh in another directory and I still could not open it. But, another computer with Delphi 10.3.3 can load the project and its main form just fine. DFM size is 3,544,092 bytes PAS size is 414,839 bytes I didn't hear any limit about dfm/unit size. Providing these information just in case. My internet searches lead to actually corrupt files having similar errors and line number is not one. Wanted to ask in here with the hope that I am not the only person and there is a way to solve the problem. Thanks & Regards, Ertan Share this post Link to post
dummzeuch 1505 Posted November 7, 2022 Have you tried to open the .pas file when the .dfm file is not there? And vice versa? Share this post Link to post
ertank 27 Posted November 7, 2022 Didn't think of that. Opening only .pas file alone gives below error ANA_SAYFA.pas(1): Line endings were inconsistent and have been converted to CRLF. However, still no code displayed and it is an empty page. Something to check though. Thank you. Share this post Link to post
microtronx 38 Posted November 7, 2022 I would open both files with notepad++ and save them / convert them to "windows CR LF" and "ANSI" and try it again with delphi. Share this post Link to post
Lajos Juhász 293 Posted November 7, 2022 3 hours ago, microtronx said: and "ANSI" it's a bad idea, only English text should be saved as ANSI, otherwise you should always save as UTF-8. Share this post Link to post
gkobler 38 Posted November 7, 2022 Open the file with Notepad++ and enable the option "show invisible chars". May there are someone chars where you not see on a normal editor Share this post Link to post
ertank 27 Posted November 7, 2022 Once line endings are fixed, project opened just fine. Seems Delphi 10.3.3 breaks them. Maybe when file is UTF8 encoded... Share this post Link to post