On Tue, 25 Mar 2025 09:36:46 GMT, Oliver Schmidtmer <oschmidt...@openjdk.org> wrote:
>> 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`. > > As @mstr2 said, I think the data is always converted to CF_UNICODETEXT. If it > wasn't there should have been more visible problems, as the current code > always assumes wide chars. > > So I just need to know how much we should change within this ticket: Just > removing CF_TEXT from here, or also removing flavors from create_mime_stuff(). I think the point is to explicitly request `CF_UNICODETEXT` and, if Clipboard has `CF_TEXT` or `CF_OEMTEXT` inside, it will automatically convert it to Unicode on output. This way we ensure we always get 2-byte Unicode text independently of Clipboard contents. So I would say to change the flavors in `create_mime_stuff()` as well. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1724#discussion_r2011726310