Hi, On 21 August 2012 11:45, Mattias Gaertner <nc-gaert...@netcologne.de> wrote: > I agree that TStringList can easily create a performance problem, but > afaik loading a text into a GUI is not a good example to > show conversion overhead.
Maybe so, but it does debunk the statement "does not happen too often". >> This is a simple example, but look at all the conversions already. Now >> if UnicodeString uses the correct encoding on each platform, the >> conversions would be zero! > > No. On Windows you have to open UTF-8 files too. OK, so zero is maybe incorrect. Let change it to 1 conversion (the file contents only, seeing that just about nobody stores files in UTF-16 encoding). Now compare 1 conversion to the multiple conversions under Linux if the RTL is only UTF-16 based. And as you so clearly stated in a prior message, it depends on what your application does. Some programs will be heavily penalised by so many conversions. -- Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel