Am 2016-08-02 um 20:12 schrieb José Mejuto: > Check the length of the string I think you have a NULL char at the end of every string, so only the first one (up to #00 char) is displayed.
Yes, you are right. When I change the code ---------------------------- for i := Low(Liste) to High(Liste) do S := S+Liste[i]+LineEnding; ---------------------------- to ---------------------------- for i := Low(Liste) to High(Liste) do S := S+pchar(Liste[i])+LineEnding; ---------------------------- then it works okay. The Win-API call retrieves the ending null byte too so it ends up in my array of strings. Strange is that it already worked with FPC 2.x. Of course I had to convert UTF16 to UTF8 manually but I don't have the old code anymore. It could be that I had to use pchar in that case too which would explain why it worked before (I then removed "unneccessary" convertion routines and it seems I removed the pchar calls too). _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal