Autor Beitrag
Muffin
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 99

WinXP Pro SP2
D7 Personal
BeitragVerfasst: Mo 26.09.05 14:48 
Ich würde gerne Unicode .ini Dateien mit der Unit Inifiles bearbeiten. Die Unit arbeitet nur leider lediglich mit ANSI Texten. Bekommt sie eine Unicode Datei, klappt das ganze überhaupt nicht.
Hat jemand so eine Unit? Ich brauch sie für ein Open Source Projekt. Erwähnung ist selbstverständlich!
Martin1966
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1068

Win 2000, Win XP
Delphi 7, Delphi 2005
BeitragVerfasst: Mo 26.09.05 14:59 
Versuch mal die Ini-Klasse von TntWare zu benutzen: www.tntware.com/delp...nicode/downloads.htm

Lg Martin
Muffin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 99

WinXP Pro SP2
D7 Personal
BeitragVerfasst: Mo 26.09.05 17:00 
Vielen Dank. Unicode und Delphi scheint ja etwas problematisch zu sein.
LonghornUser
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 796



BeitragVerfasst: Do 27.05.10 22:42 
Da ich genau die gleiche Frage habe, grabe ich den Thread mal wieder aus.

Wie es aussieht, gibt es die TntIniFile-Komponente ja nicht mehr kostenlos (jetzt bei TMS Software??). Gibt es irgendeine andere Möglichkeit, Unicode in INI-Dateien zu schreiben?

Falls das wichtig ist: Ich nutze Delphi 2010.
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8549
Erhaltene Danke: 478

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Do 27.05.10 22:50 
Wenn du Delphi 2010 nutzt, ist die Ini doch eh Unicode-fähig, weil dort alle Strings UnicodeStrings sind, oder nicht? Die TMS-Komponenten braucht man nur für Delphi 2007 oder früher.

Es kann aber sein, dass die zugrundeliegende veraltete WindowsAPI nur AnsiStrings unterstützt. In dem Fall kannst du aber die Daten UTF8-kodiert in die Ini schreiben. Das sollte dann funktionieren.

_________________
We are, we were and will not be.
LonghornUser
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 796



BeitragVerfasst: Do 27.05.10 23:36 
Also wenn ich es in eine INI-Datei speichere (ini.WriteString), stehen nur noch Fragezeichen in der Datei.

Mit UTF8Encode komme ich auch nicht weiter, weil z.B. thailändische Zeichen in UTF-8 nicht enthalten sind. In Unicode allerdings schon.
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8549
Erhaltene Danke: 478

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Fr 28.05.10 07:33 
Natürlich lassen sich thailandische Zeichen in UTF8 darstellen. Ebenso Koreanisch, Chinesisch, Keilschrift und ägyptische Hieroglyphen.

_________________
We are, we were and will not be.