Copying from Windows VSCode replaces spaces with nbsp
I copied some code from a remote VSCode (running on Windows 10) to a local vim session running on macOS and was surprised to find all space characters changed into non-breakable spaces.
Digging into this, I see that remote clipboard contains CF_TEXT/CF_UNICODETEXT formats with proper spaces (0x20) and syntax highlighted HTML with nbsp-s.
The local clipboard has 'public.utf8-plain-text' with 0xc2 0xa0 (i.e. non-breakable space) in place of the spaces.
Can anyone please check if they can reproduce? I'm thinking it's either Jump Desktop doing some weird processing or another app on my end that intervenes before I can see. The diagnostic logs for JD don't have any clipboard-related tracing messages, can I enable those somehow?
Steps:
1) On the remote end either copy from a JavaScript file in VSCode or use this nice program: https://www.nirsoft.net/utils/inside_clipboard.html (File -> Load from .Clp file) to make the clipboard exactly as I'm seeing after copying these 4 characters from VSCode: ', '
The clp file should be downloadable from this URL: data:file/octet-stream;base64,UMMGAKvAnwEAABoCAABIVE1MIEZvcm1hdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAKAAAAuQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABVwuAAAADDAwAAQ2hyb21pdW0gV2ViIEN1c3RvbSBNSU1FIERhdGEgRm9ybWF0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAABAAAAKMEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAFAAAApwQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUAAACsBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFZlcnNpb246MC45DQpTdGFydEhUTUw6MDAwMDAwMDEwNQ0KRW5kSFRNTDowMDAwMDAwNDE0DQpTdGFydEZyYWdtZW50OjAwMDAwMDAxNDENCkVuZEZyYWdtZW50OjAwMDAwMDAzNzgNCjxodG1sPg0KPGJvZHk+DQo8IS0tU3RhcnRGcmFnbWVudC0tPjxkaXYgc3R5bGU9ImNvbG9yOiAjMDAwMDAwO2JhY2tncm91bmQtY29sb3I6ICNmZmZmZmY7Zm9udC1mYW1pbHk6IENvbnNvbGFzLCAnQ291cmllciBOZXcnLCBtb25vc3BhY2U7Zm9udC13ZWlnaHQ6IG5vcm1hbDtmb250LXNpemU6IDE0cHg7bGluZS1oZWlnaHQ6IDE5cHg7d2hpdGUtc3BhY2U6IHByZTsiPjxkaXY+PHNwYW4gc3R5bGU9ImNvbG9yOiAjYTMxNTE1OyI+JywmIzE2MDsnPC9zcGFuPjwvZGl2PjwvZGl2PjwhLS1FbmRGcmFnbWVudC0tPg0KPC9ib2R5Pg0KPC9odG1sPgAnACwAIAAnAAAA3AAAAAEAAAASAAAAdgBzAGMAbwBkAGUALQBlAGQAaQB0AG8AcgAtAGQAYQB0AGEAVQAAAHsAIgB2AGUAcgBzAGkAbwBuACIAOgAxACwAIgBpAHMARgByAG8AbQBFAG0AcAB0AHkAUwBlAGwAZQBjAHQAaQBvAG4AIgA6AGYAYQBsAHMAZQAsACIAbQB1AGwAdABpAGMAdQByAHMAbwByAFQAZQB4AHQAIgA6AG4AdQBsAGwALAAiAG0AbwBkAGUAIgA6ACIAagBhAHYAYQBzAGMAcgBpAHAAdAAiAH0AAAAJBAAAJywgJwAnLCAnAA==
2) On the macOS side use this app to observe the clipboard https://langui.net/clipboard-viewer/ or run the following in your console:
pbpaste | hexdump
PS The only similar post I've found is https://support.jumpdesktop.com/hc/en-us/community/posts/115000392126-RDP-Clipboard-issue - where the reporter was not willing to continue troubleshooting..
Please sign in to leave a comment.
Comments
0 comments