I recently received some Delphi 2007 source code that was written by another developer.
I noticed when I click on a component icon in the IDE that Delphi generates the stub code as you would expect, HOWEVER it is 'stealing' the first character from the next procedure or function and placing that character in front of the generated code.
For example, when clicking on the RaizeObjects Launcher component icon in the IDE, I get this generated code with an "f" stolen from the next function (or it would be a "p" if the next item was a procedure):
fprocedure TFLogin.RzLauncher1Error(Sender: TObject; ErrorCode: Cardinal);
begin
end;
unction TFLogin.DelDir(dir: string): Boolean;
var
Of course, this corrupts my source code everytime I click on a component icon in the IDE.
I did a hex dump on the source and found that these source files only have a linefeed (0A) in them and not the Carriage Return (0D) & Linefeed (0A) that my locally produced code has (examples below).
Hex dump of a typical source file Delphi normally produces:
unit Unit1; (CR & LF)
75 6E 69 74 20 55 6E 69 74 31 3B 0D 0A
Example source code file from other person (hex dump):
unit Calc; (LF)
75 6E 69 74 20 43 61 6C 63 3B 0A
Saving the source in my editor does not fix this issue. My question is, how do I fix this issue? Is there a setting in Delphi 2007 telling it to just use linefeeds, or is there some Windows 7 setting to adjust for this issue?