Automatic ANSI<>Unicode message translation

Alexandre Julliard julliard at winehq.org
Wed Jul 27 05:34:04 CDT 2005


Troy Rollo <wine at troy.rollo.name> writes:

> On the other hand SendMessageA of any character to an A window procedure 
> (regardless of any DBCS rules that might apply) ought to pass the character 
> through immediately.
> 
> This means that ideally, if the window is not a unicode window, then there 
> should be no A->W->A translation.

Since there is no way of knowing if the target window uses the same
code page, or even if its code page won't change between the time the
message is stored in the queue and when it is retrieved, the only sane
approach is to store messages in the queue in Unicode. Only
SendMessage calls that bypass the queue avoid the translation. I'm
pretty sure that this is what Windows does too, if you have a test
demonstrating the opposite I'd be very interested to see it.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list