Autor Beitrag
pwsolaris
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 71
Erhaltene Danke: 1

MS DOS, Win 95, Win 98, Win ME, Win XP, Win Vista, Win 7 Ultimate
Delphi 5 Enterp., Delphi 2007, Delphi 2009, Informix 4GL, VB .NET, MS/SQL, PL/SQL
BeitragVerfasst: Do 28.04.11 20:33 
Hallo,

habe eben ein echt komisches Phänomen bei meinem Delphi gesehen...

Ich habe ein Projekt auf eine externe Festplatte verschoben (den kompletten Ordner mit allen Dateien).
Wenn ich jetzt in Delphi (2009) das Projekt öffne, bekomme ich nur folgenden Text (hex):
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
70726F6772616D20 524F4541323B0D0A 0D0A757365730D0A 2020466F726D732C
0D0A20206D61696E 20696E20276D6169 6E2E70617327207B 66726D5F524F4541
327D2C0D0A20206E 657520696E20276E 65752E7061732720 7B66726D5F6E6575
7D2C0D0A20206C61 64656E20696E2027 6C6164656E2E7061 7327207B66726D5F
6C6164656E7D2C0D 0A20206A6F627765 636873656C20696E 20276A6F62776563
6873656C2E706173 27207B66726D5F6A 6F62776563687365 6C7D2C0D0A202069
74656D73686F7020 696E20276974656D 73686F702E706173 27207B66726D0400
686F707D3B0D0A0D 0A7B2452202A2E72 65737D0D0A0D0A62 6567696E0D0A2020
4170706C69636174 696F6E2E496E6974 69616C697A653B0D 0A20204170706C69
636174696F6E2E4D 61696E466F726D4F 6E5461736B626172 203A3D2054727565
3B0D0A2020417070 6C69636174696F6E 2E5469746C65203A 3D20275261676E61
726F6B204F6E6C69 6E6520456E647572 616E636520417265 6E6120322E30273B
0D0A20204170706C 69636174696F6E2E 437265617465466F 726D285466726D5F
524F4541322C2066 726D5F524F454132 293B0D0A20204170 706C69636174696F
6E2E437265617465 466F726D28546672 6D5F6E65752C2066 726D5F6E6575293B
0D0A20204170706C 69636174696F6E2E 437265617465466F 726D285466726D5F
6C6164656E2C2066 726D5F6C6164656E 293B0D0A20204170 706C69636174696F
6E2E437265617465 466F726D28546672 6D5F6A6F62776563 6873656C2C206672
6D5F6A6F62776563 6873656C293B0D0A 20204170706C6963 6174696F6E2E4372
65617465466F726D 285466726D5F7368 6F702C2066726D5F 73686F70293B0D0A
20204170706C6963 6174696F6E2E5275 6E3B0D0A656E642E 0D0A


Normalerweise sollte da folgender Text stehen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
program ROEA2;

uses
  Forms,
  main in 'main.pas' {frm_ROEA2},
  neu in 'neu.pas' {frm_neu},
  laden in 'laden.pas' {frm_laden},
  jobwechsel in 'jobwechsel.pas' {frm_jobwechsel},
  itemshop in 'itemshop.pas' {frm_shop};

{$R *.res}

begin
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.Title := 'Ragnarok Online Endurance Arena 2.0';
  Application.CreateForm(Tfrm_ROEA2, frm_ROEA2);
  Application.CreateForm(Tfrm_neu, frm_neu);
  Application.CreateForm(Tfrm_laden, frm_laden);
  Application.CreateForm(Tfrm_jobwechsel, frm_jobwechsel);
  Application.CreateForm(Tfrm_shop, frm_shop);
  Application.Run;
end.


Wenn ich nun den eigentlichen Text wieder in die Datei kopiere und dann speichern möchte kommt folgender Fehler:

Screenshot

Kann mir damit irgendwer weiterhelfen?

Ich habe volle Schreibrechte auf der externen Festplatte und ein "Zurückkopieren" in den Ursprungsordner hilft leider auch nicht weiter...

Moderiert von user profile iconNarses: Bild als Anhang hochgeladen.
Moderiert von user profile iconNarses: Topic aus Sonstiges (Delphi) verschoben am Fr 29.04.2011 um 00:26
Einloggen, um Attachments anzusehen!
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19338
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Do 28.04.11 21:33 
Was zeigt denn ein normaler Editor wie Notepad++ als aktuelle Kodierung des Dokuments an? Bzw. ist dort der Text in der .dpr Datei denn vorhanden?
pwsolaris Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 71
Erhaltene Danke: 1

MS DOS, Win 95, Win 98, Win ME, Win XP, Win Vista, Win 7 Ultimate
Delphi 5 Enterp., Delphi 2007, Delphi 2009, Informix 4GL, VB .NET, MS/SQL, PL/SQL
BeitragVerfasst: Do 28.04.11 21:46 
Nachdem ich nun mal Notepad++ installiert habe kann ich das gerne beantworten :)

Also bei Notepad++ steht als Codierung "ANSI" und der Text ist folgender:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
program ROEA2;

uses
  Forms,
  main in 'main.pas' {frm_ROEA2},
  neu in 'neu.pas' {frm_neu},
  laden in 'laden.pas' {frm_laden},
  jobwechsel in 'jobwechsel.pas' {frm_jobwechsel},
  itemshop in 'itemshop.pas' {frmhop};

{$R *.res}

begin
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.Title := 'Ragnarok Online Endurance Arena 2.0';
  Application.CreateForm(Tfrm_ROEA2, frm_ROEA2);
  Application.CreateForm(Tfrm_neu, frm_neu);
  Application.CreateForm(Tfrm_laden, frm_laden);
  Application.CreateForm(Tfrm_jobwechsel, frm_jobwechsel);
  Application.CreateForm(Tfrm_shop, frm_shop);
  Application.Run;
end.

Und jetzt... nachdem ich mit Notepad++ die Datei geändert habe (Ein Sonderzeichen bei frm_shop) und die mit diesem Editor gespeichert habe, funktioniert das Ganze wieder.

Edit: Als ich die Datei mit dem normalen Editor geöffnet, verändert und gesichert habe, hat es nicht funktioniert... kennt da noch jemand den Grund?

Vielen Dank :)

Moderiert von user profile iconNarses: Code- durch Delphi-Tags ersetzt
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19338
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Do 28.04.11 21:52 
user profile iconpwsolaris hat folgendes geschrieben Zum zitierten Posting springen:
Edit: Als ich die Datei mit dem normalen Editor geöffnet, verändert und gesichert habe, hat es nicht funktioniert... kennt da noch jemand den Grund?
Dort musst du Speichern unter benutzen und die Zielkodierung ändern, damit die Datei neu kodiert wird.
pwsolaris Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 71
Erhaltene Danke: 1

MS DOS, Win 95, Win 98, Win ME, Win XP, Win Vista, Win 7 Ultimate
Delphi 5 Enterp., Delphi 2007, Delphi 2009, Informix 4GL, VB .NET, MS/SQL, PL/SQL
BeitragVerfasst: Fr 29.04.11 05:59 
Ah OK.
Darauf wäre ich bestimmt nicht so schnell gekommen :D
Frag mich immer noch wie das passiert sein kann, dass wirklich nur die Projektdateien (*.dpr und *.dproj) so verändert wurden. Das Dateisystem ist auf beiden Platten NTFS und es war auch sonst ein unkomplizierter Kopier-Prozess...

Naja ich bedanke mich für die Hilfe und kann endlich weiter Programmieren :D