Using SentMessage utility [1], and WM_UNICHAR message documentation [2]: 1. Create a new text document in Writer; 2. launch SendMessage utility, and drag its "target" tool to the Writer's main area to find its window; 3. Put '0x0109' (i.e., WM_UNICHAR hex value) to 'Message' box in SendMessage; 4. Put '0x1F34E' (i.e., U+1F34E "RED APPLE") to 'WPARAM' box in SendMessage; 5. Put 0 to LPARAM box in SendMessage; 6. Press [ SendMessage ] button. Expected result: an apple character in Writer; following Alt+X there should result in U+1f34e (this should be true, even if no font on system provides the apple character). Actual result: a "whitespace" character is shown in Writer; Alt+X there results in U+df4e (the low surrogate of the correct 'D83C DF4E' UTF-16 surrogate pair). Wrong implementation of the message support from start, not passing the high surrogate to the frame. [1] https://tools.stefankueng.com/SendMessage.html [2] https://learn.microsoft.com/en-us/windows/win32/inputdev/wm-unichar
https://gerrit.libreoffice.org/c/core/+/154996
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/724ba1e455d4ae47a00248586487443347f1be96 tdf#156459: fix WM_UNICHAR implementation It will be available in 24.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.