Yes, no other changes but those necessary to make it compile. Basically the same as for every new version of Delphi. Sadly there hasn't been any general improvements in GExperts for a long time. The XE8 IDE was rather unhelpful because it kept adding units (System. Actions) to the uses clause, that were already there, just surrounded by conditional defines. Also, it changed several DFM files for no good reason. Good thing I had source control.
Interesting: The XE8 IDE displays 'Δ' (#$0394) as a dash in the code editor but as a Greek delta in the search dialog. (correction: That was just the font I am using in the editor, Courier New displays everything as it should) I can reproduce the problem with the formatter, but I doubt that I can do much about it. It happens when converting unicode to ansi and back. The best solution would of course be to make the formatter unicode aware.
Hichem BOUKSANI I might have fixed the problem. (Unfortunately one of my unit tests fails now for non-unicode Delphi because the lines lengths are counted differently.)
Which version of Delphi do you use? I would like to give you a test version of GExperts so you can verify that it works for you.
This works for me with the code sample you provided. Please check whether it solves your problem and report back.
(I posted that link originally in a private G+ message to you but apparently you didn't see it.)
Everybody else be warned: This version has not been thoroughly tested. You use it at your own risk. If it works for Hichem BOUKSANI I will do a new release.
Thomas Mueller You forget /Gexperts/ in your download link, but anyway I test the version on an UTF8 and Ansi (with arabic chars) file format, it functions correctly. Please set borderstyle to bsDialog of "Delphi Formatter Configuration" Form to avoid resizing. Thanks again
Thank you very much.
ReplyDeleteAwesome! My IDE is nearly complete.
ReplyDeleteI guess that's just a recompile after adding the necessary conditional defines, constants and project files? Or were there any other changes?
ReplyDeleteYes, no other changes but those necessary to make it compile. Basically the same as for every new version of Delphi. Sadly there hasn't been any general improvements in GExperts for a long time. The XE8 IDE was rather unhelpful because it kept adding units (System. Actions) to the uses clause, that were already there, just surrounded by conditional defines. Also, it changed several DFM files for no good reason. Good thing I had source control.
ReplyDeleteHi Thomas, I woult like to report a bug in source formatter, It break the unicode characters, it replace them with '?'
ReplyDeleteHichem BOUKSANI Could you please supply an example file?
ReplyDeleteHi,
ReplyDeletebefore formating
unit Unit1;
interface
implementation
function TFSend.IsGSMChar(C: WideChar): Boolean;
begin
Result := (C = '@') or (C = '£') or (C = '$') or (C = '¥') or (C = 'è') or (C = 'é') or
(C = 'ù') or (C = 'î') or (C = 'ô') or (C = 'Ç') or (C = #10) or (C = 'Ø') or (C = 'ø') or
(C = #13) or (C = 'Å') or (C = 'å') or (C = 'Δ') or (C = '_') or (C = 'Φ') or (C = 'Γ') or
(C = 'Λ') or (C = 'Ω') or (C = 'Π') or (C = 'Ψ') or (C = 'Σ') or (C = 'Θ') or (C = 'Ξ') or
(C = #27) or (C = #28) or (C = '^') or (C = '{') or (C = '}') or (C = '\') or (C = '[') or
(C = '~') or (C = ']') or (C = '|') or (C = '€') or (C = 'Æ') or (C = 'æ') or (C = 'ß') or
(C = 'É') or CharInSet(C, [' '..'#']) or CharInSet(C, ['%'..'?']) or (C = '¡') or
CharInSet(C, ['A'..'Z']) or (C = 'Ä') or (C = 'Ö') or (C = 'Ñ') or (C = 'Ü') or
(C = '§') or (C = '¿') or CharInSet(C, ['a'..'z']) or (C = 'ä') or (C = 'ö') or
(C = 'ñ') or (C = 'ü') or (C = 'à ');
end;
end.
After formating
unit Unit1;
interface
implementation
function TFSend.IsGSMChar(C: WideChar): Boolean;
begin
Result := (C = '@') or (C = '£') or (C = '$') or (C = '¥') or (C = 'è') or (C = 'é') or
(C = 'ù') or (C = 'î') or (C = 'ô') or (C = 'C') or (C = #10) or (C = '?') or (C = '?') or
(C = #13) or (C = '?') or (C = '?') or (C = '?') or (C = '_') or (C = '?') or (C = '?') or
(C = '?') or (C = '?') or (C = '?') or (C = '?') or (C = '?') or (C = '?') or (C = '?') or
(C = #27) or (C = #28) or (C = '^') or (C = '{') or (C = '}') or (C = '\') or (C = '[') or
(C = '~') or (C = ']') or (C = '|') or (C = '€') or (C = '?') or (C = '?') or (C = '?') or
(C = 'E') or CharInSet(C, [' '..'#']) or CharInSet(C, ['%'..'?']) or (C = '?') or
CharInSet(C, ['A'..'Z']) or (C = '?') or (C = '?') or (C = '?') or (C = 'U') or
(C = '§') or (C = '?') or CharInSet(C, ['a'..'z']) or (C = '?') or (C = '?') or
(C = '?') or (C = 'ü') or (C = 'à ');
end;
end.
As you can see, many of characters are change to '?'
Interesting: The XE8 IDE displays 'Δ' (#$0394) as a dash in the code editor but as a Greek delta in the search dialog. (correction: That was just the font I am using in the editor, Courier New displays everything as it should)
ReplyDeleteI can reproduce the problem with the formatter, but I doubt that I can do much about it. It happens when converting unicode to ansi and back. The best solution would of course be to make the formatter unicode aware.
Hichem BOUKSANI I might have fixed the problem. (Unfortunately one of my unit tests fails now for non-unicode Delphi because the lines lengths are counted differently.)
ReplyDeleteWhich version of Delphi do you use? I would like to give you a test version of GExperts so you can verify that it works for you.
Thomas Mueller I use Delphi XE8. Thanks for you quick response
ReplyDeleteHichem BOUKSANI I sent you a download link for a test version via a private post. Did you get it?
ReplyDeleteThomas Mueller I did not receive your download link
ReplyDeleteHichem BOUKSANI here you go:
ReplyDeletehttp://download.dummzeuch.de/GExperts-XE8-1.37_experimental-twm-2015-05-25.7z
This works for me with the code sample you provided. Please check whether it solves your problem and report back.
(I posted that link originally in a private G+ message to you but apparently you didn't see it.)
Everybody else be warned: This version has not been thoroughly tested. You use it at your own risk. If it works for Hichem BOUKSANI I will do a new release.
Thomas Mueller You forget /Gexperts/ in your download link, but anyway I test the version on an UTF8 and Ansi (with arabic chars) file format, it functions correctly.
ReplyDeletePlease set borderstyle to bsDialog of "Delphi Formatter Configuration" Form to avoid resizing.
Thanks again