RFR: 8281384: Random chars on paste from Windows clipboard [v4]
Lukasz Kostyra
lkostyra at openjdk.org
Mon Mar 24 09:16:18 UTC 2025
On Fri, 28 Feb 2025 16:48:39 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> As the existing code was already pretty optimistic about 2 byte chars, is it possible that is already handled somewhere else?
>> I'm not sure whether this is done explicitly somewhere or if CF_UNICODETEXT is just tried first.
>
> Could be, but in any case, the way it's impemented right now doesn't seem to be right. We should only assume 2-byte characters if what's being pulled from the clipboard is actually `CF_UNICODETEXT`.
I did a little bit of digging and we will sometimes request `CF_TEXT` and `CF_OEMTEXT` (see `create_mime_stuff()` in this file). Technically we could change the pairings there and always request text data in `CF_UNICODETEXT`, but I would do some more testing and check if that doesn't cause regressions in some surprise spot.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1724#discussion_r2009765278
More information about the openjfx-dev
mailing list