Felipe Monteiro de Carvalho wrote:
> Reminder. Was the patch applied? I took a quick look and think not.
Applied, r10296
Thanks.
I've added some code to handle strings withgout null terminator passed
to DrawText, ExtTextOut, GetTextExtentPoint (one cannot assign them to a
string)
However this code is not ok. It copies to litle chars.
These functions expect in the Count param, the number of Characters and
not the the number of bytes/words a string occupies.
So to do it right,
1) we need to know the number of bytes a given utf8 array of char would
use.
2) copy those chars to a (utf) string
3) pass this string to Utf8Decode/Utf8ToAnsi
4) if we calculated the count, pass this count to the winapi, to the
winapi doesn't have to count the characters again.
Marc
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives