AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Falsche Zeichen in Projektdatei

Ein Thema von Hobbycoder · begonnen am 13. Sep 2018 · letzter Beitrag vom 13. Sep 2018
Antwort Antwort
Benutzerbild von GPRSNerd
GPRSNerd

Registriert seit: 30. Dez 2004
Ort: Ruhrpott
239 Beiträge
 
Delphi 10.4 Sydney
 
#1

AW: Falsche Zeichen in Projektdatei

  Alt 13. Sep 2018, 14:14
Ist ein Fehler, den ich seit gefühlten 10 Delphi-IDE-Versionen mal mehr oder mal weniger habe.
Tritt bei mir häufiger auf, wenn ich ein großes Package mit etlichen Komponenten-Projekten builde.
Ich habe leider nie herausfinden können, wann oder wodurch es auftritt...

Hier ist was dazu in den Emba-Foren:
https://forums.embarcadero.com/threa...hreadID=266432

Aha:

Zitat:
As Olivier said, this is caused by a mix of CR and CRLF line terminators in the file.

To fix it, here is what I did.

1. I opened the file in 32-bit non-Unicode notepad (this was a bit ago). The CR breaks did not resolve, and the lines were merged together.
2. Hit enter where the line break should be. That put the CRLF in the correct place.
3. Saved

It is very beneficial if you can see this in a separate text editor that shows different characters between CR and CRLF; maybe Notepad++?. In my case, I didn't have one, but the file compare in TortoiseGit would show the CR as a straight-down arrow and the CRLF as a bent arrow.
Stefan

Geändert von GPRSNerd (13. Sep 2018 um 14:17 Uhr)
  Mit Zitat antworten Zitat
Benutzerbild von KodeZwerg
KodeZwerg

Registriert seit: 1. Feb 2018
3.691 Beiträge
 
Delphi 11 Alexandria
 
#2

AW: Falsche Zeichen in Projektdatei

  Alt 13. Sep 2018, 14:33
Das obige Zitat funktioniert heute immer noch so. Wie andere Text Editoren das handhaben kann ich nicht beurteilen aber Datei mit Notepad++ reinladen, ohne Kodierung speichern, problem erledigt.
Gruß vom KodeZwerg
  Mit Zitat antworten Zitat
Delphi.Narium

Registriert seit: 27. Nov 2017
2.598 Beiträge
 
Delphi 7 Professional
 
#3

AW: Falsche Zeichen in Projektdatei

  Alt 13. Sep 2018, 14:52
Wenn man's selbst reparieren will:
Delphi-Quellcode:
procedure CRLFReparatur(AFilename : String);
var
  sl : TStringList;
begin
  sl := TStringList.Create;
  sl.LoadFromFile(AFilename);
  sl.SaveToFile(AFilename);
  sl.Free;
end;

begin
  // Hier kann man natürlich auch über 'nen Filedialog oder sonstwie
  // die Datei(en) auswählen.
  CRLFReparatur('c:\temp\synedit_d.dpk');
end;
  Mit Zitat antworten Zitat
Benutzerbild von Sherlock
Sherlock

Registriert seit: 10. Jan 2006
Ort: Offenbach
3.821 Beiträge
 
Delphi 12 Athens
 
#4

AW: Falsche Zeichen in Projektdatei

  Alt 13. Sep 2018, 15:42
Einmal die Codeformatierung drüber laufen lassen?

Sherlock
Oliver
Geändert von Sherlock (Morgen um 16:78 Uhr) Grund: Weil ich es kann
  Mit Zitat antworten Zitat
Hobbycoder

Registriert seit: 22. Feb 2017
1.017 Beiträge
 
#5

AW: Falsche Zeichen in Projektdatei

  Alt 13. Sep 2018, 16:13
Okay. Ich wollte ja hauptsächlich wissen, ob nur ich das Problem habe, oder ob das bei anderen auch auftritt.

Danke.
Gruß Hobbycoder
Alle sagten: "Das geht nicht.". Dann kam einer, der wusste das nicht, und hat's einfach gemacht.
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:02 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz