Quote:
|
Ich habe doch lediglich mit dem editor von Windows eine Textdatei erstellt.
|
Mit welchem Texteditor hast Du die Datei erstellt ?
Ich habe sie mit dem NotePad gelesen und da gesehen dass die mit Unicode gespeichert wurde und nicht mit UTF-8. Habe sie dann vom NotePad mit UTF-8 gespeichert und es funktionierte.
Quote:
|
Kann man denn beim einlesen mit dem "ReadLine" in UTF-8 umwandeln. oder muss man das schon beim Befehl "OpenInput", also beim öffnen der Datei mitgeben?
|
Ja, aber Du musst folgende Zeile eingeben, mit dem CharacterSet der Originaldatei:
Code:
<font face="Courier New"><font size="2"><font size="2">TR1.Initialize2(</font></font><font size="2"><font color="#0000ff"><font size="2"><font color="#0000ff"><font size="2"><font color="#0000ff">File</font></font></font></font></font></font><font size="2"><font size="2">.OpenInput(</font></font><font size="2"><font color="#0000ff"><font size="2"><font color="#0000ff"><font size="2"><font color="#0000ff">File</font></font></font></font></font></font><font size="2"><font size="2">.DirAssets, </font></font><font size="2"><font color="#800000"><font size="2"><font color="#800000"><font size="2"><font color="#800000">"tabelle.txt"</font></font></font></font></font></font><font size="2"><font size="2">),</font></font><font size="2"><font color="#800000"><font size="2"><font color="#800000"><font size="2"><font color="#800000">"UTF-16"</font></font></font></font></font></font><font size="2"><font size="2">)</font></font></font>
Das funktioniiert mit Deiner Originaldatei.
Und nicht:
Code:
<font face="Courier New">TR1.Initialize(<font size="2"><font color="#0000ff"><font size="2"><font color="#0000ff"><font size="2"><font color="#0000ff">File</font></font></font></font></font></font><font size="2"><font size="2">.OpenInput(</font></font><font size="2"><font color="#0000ff"><font size="2"><font color="#0000ff"><font size="2"><font color="#0000ff">File</font></font></font></font></font></font><font size="2"><font size="2">.DirAssets, </font></font><font size="2"><font color="#800000"><font size="2"><font color="#800000"><font size="2"><font color="#800000">"tabelle.txt"</font></font></font></font></font></font><font size="2"><font size="2">)</font></font><font size="2"><font size="2">)</font></font></font>
Beste Grüsse.