What you're tying to do is not possible in current QB64 versions. QB64 uses the flag CF_TEXT in its _CLIPBOARD$ commands, i.e. even if you copy unicode from some other program into the clipboard you won't get it back as is. The OS knows it currently has unicode in the clip, but QB64 requests to get out regular ansi text (CF_TEXT instead of CF_UNICODETEXT), so the OS goes and internally converts the clip contents to fit the ansi type requested by QB64.
I had the same problem when doing some automation to maintain our Wiki via clipboard, but it constantly messed up any extended ASCII characters.
I'll make an issue at github for it, for a quick fix you could go into file "internal/c/libqb.cpp" looking for the "sub__clipboard" and "func__clipboard" and in that sub/functions replace all occurrences of CF_TEXT with CF_UNICODETEXT and save the file.
After that start the IDE and select the entry "Purge C++ libraries" from the "Debug" menu. After that recompile your program and it should work with unicode text.
BUT ATTENTION: Unicode on the clipboard does usually mean you work with wide chars, not ASCII anymore, i.e. encoding is now UTF-16 (little endian).
Maybe Zak (@Balderdash) can give you more info on that, it's probably easier/safer to use direct WinAPI calls, than messing with QB64 internals.
I had the same problem when doing some automation to maintain our Wiki via clipboard, but it constantly messed up any extended ASCII characters.
I'll make an issue at github for it, for a quick fix you could go into file "internal/c/libqb.cpp" looking for the "sub__clipboard" and "func__clipboard" and in that sub/functions replace all occurrences of CF_TEXT with CF_UNICODETEXT and save the file.
After that start the IDE and select the entry "Purge C++ libraries" from the "Debug" menu. After that recompile your program and it should work with unicode text.
BUT ATTENTION: Unicode on the clipboard does usually mean you work with wide chars, not ASCII anymore, i.e. encoding is now UTF-16 (little endian).
Maybe Zak (@Balderdash) can give you more info on that, it's probably easier/safer to use direct WinAPI calls, than messing with QB64 internals.
GuiTools, Blankers & other Projects:
https://staging.qb64phoenix.com/forumdisplay.php?fid=32
Libraries & useful Functions:
https://staging.qb64phoenix.com/forumdisplay.php?fid=23
https://staging.qb64phoenix.com/forumdisplay.php?fid=32
Libraries & useful Functions:
https://staging.qb64phoenix.com/forumdisplay.php?fid=23