Francois PIETTE wrote: >>> If the problem with current demos ini files is just related to >>> Unicode strings handling, probably an TCustomIniFile descendant >>> with string utf8 encode/decode is enough. >> >> Obvious from TCustomIniFile will not work, must be descendant from >> TIniFile. >> >> TMyUnicodeIniFile=Class(TIniFile) >> public >> function ReadString(const Section, Ident, Default: string): >> string; override; >> procedure WriteString(const Section, Ident, Value: String); >> override; end; >> >> ... >> >> function TMyUnicodeIniFile.ReadString(const Section, Ident, Default: >> string): string; >> begin >> result:=utf8decode(inherited ReadString(section, ident, default)); >> end; >> >> procedure TMyUnicodeIniFile.WriteString(const Section, Ident, Value: >> string); >> begin >> inherited WriteString(Section, Ident, Utf8Encode(Value)); >> end; > > > That's the kind of code I had in mind.
It is not that easy! The code above might work if String maps to an AnsiString, however fails if String maps to a UnicodeString ( Delpi 2009 ). -- Arno Garrels > > -- > [EMAIL PROTECTED] > The author of the freeware multi-tier middleware MidWare > The author of the freeware Internet Component Suite (ICS) > http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be