Now DrawText(Canvas.Handle,{$IFNDEF CLR}pchar{$endif}(s),length(s), temp,flags);
shows the wrong encoding. The string is utf-8, but it shows latin1 on Windows 7
and when i call utf8ToWinCP on the string it is broken on wine, because it needs utf-8 in the string there