Alexandre Julliard <[EMAIL PROTECTED]> wrote:
>Huw D M Davies <[EMAIL PROTECTED]> writes:
>
>> In lstrcpyWtoA shouldn't we call WideCharToMultiByte to explicitly
>> find the length of the multibyte string rather than assume it has the
>> same number of characters as the wide string? This of course means
>> lstrcpyWtoA is a broken interface anyway.
>
>Yes, it is broken. I think it would be better to replace the lstrcpy*
>functions by WideCharToMultiByte etc. and make sure we always set the
>right buffer length (and also fix assumptions that the W string size
>is the double of the A string size, since this is wrong for multibyte
>charsets).
Did I understand you correct and all references to a bunch of
lstrcpyW/A/W, lstrcpynA/W/A, HEAP_strdupW/A/W everywhere in Wine should
be removed and replaced by WideCharToMultiByte/MultiByteToWideChar?
I thought it would be easier to just convert them to the macros
and only then gradually move to WideCharToMultiByte/MultiByteToWideChar.
And having those functions converted to the macros would be handy to
use anyway. It is easy understandable and maintainable.
What do you think?
Dmitry.