Thanks, the UTF8Encode solution solved the problem, but it feels stupid that tXMLDocument converts all strings to UTF-16 on the Mac, because the input string is UTF-8, the IDE uses UTF-8 and the OS uses UTF-8 (and therefore the expected output is also UTF-8).
The first Showmessage does show aáäeéë correct, but it depends on how the .pas file is saved...
If the .pas file is saved WITH BOM then the shown message is "a??e??"
but if it is saved WITHOUT BOM it shows the correct characters.
Is this intended behavior or is it a bug?
(the annoying thing is that the BOM is automatically added once a while, don't know when it happens, and I have to manually remove it to make it work)
BTW, I am on OS X 10.5.8 and the Lazarus revision is 27239M
Best regards,
Hans