On Wednesday 14 September 2011 17:02:14 Hans-Peter Diettrich wrote: > Felipe Monteiro de Carvalho schrieb: > > On Tue, Sep 13, 2011 at 9:23 PM, Michael Van Canneyt > > > > <mich...@freepascal.org> wrote: > >> One with unicode string, one with ansistring. They will have the same > >> code, but will be compiled twice, each time with a different compiler > >> define to decide which version it must be. > > > > Is this possible in UNIX? I can see that in Windows you can use the > > trick to use W versions which are identical except for the string type > > and drop Windows 9x support, but is this really possible for the UNIX > > syscalls? They expect UTF-8 not UTF-16 which is what UnicodeString > > uses. > > A few topics: > [...]
Agreed. And so it is made in MSEgui: - On user side all stringhandling uses type "msestring" which is defined as the existing Free Pascal 16bit UnicodeString. - The MSEgui widgetset works with UnicodeString too. - For file and directory access MSEgui has a set of functions which convert from/to system encoding to/from type "filenamety" which is defined as existing Free Pascal 16bit UnicodeString. - MSEgui has own 16bit functions and classes for lists, maps, sorting and the like. - Text files are stored in utf-8 by default. From my point of view there is no need for a complicated encoding aware unicode string type which possibly is slower, needs more memory and introduces new bugs. Martin _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel