After the introduction of the new Windows message dispatch machinery in 6.40, decoding of the character argument sent with WM_CHAR, WM_DEADCHAR, WM_SYSCHAR and WM_SYSDEADCHAR is not correct. In particular, a signed char is sign-extended to 32 bits in the conversion to uint. See TDispatch<WM_CHAR>.
For example, character 252 ('ü' in the Windows-1252 code page) has the value -4 as a signed char, which is then converted to uint giving the value 4294967292.
Reported by @floele [discussion:bc53547f03].
Workaround
Cast the parameter ch to tchar before use. For example:
void TMyClass::EvChar(uint ch, uint repeatCount, uint flags)
{
switch (static_cast<tchar>(ch))
{
case _T('ü'): // Character 252 (-4 signed) in Windows-1252 code page.
// ...
}
}
Discussion: bc53547f03
Discussion: How to handle EvChar with umlauts?
Wiki: OWLNext_Roadmap_and_Prereleases
This issue was fixed in [r7899].
Related
Commit: [r7899]