Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null Character Appearing at the End of Copied Strings #2841

Closed
Enverex opened this issue Aug 20, 2015 · 4 comments
Closed

Null Character Appearing at the End of Copied Strings #2841

Enverex opened this issue Aug 20, 2015 · 4 comments

Comments

@Enverex
Copy link

Enverex commented Aug 20, 2015

A user is reporting that when they copy and paste text from a remote Windows box (to their local Linux client) it's not working correctly.

After some investigation it appears that for some reason when the text is copied from the Windows server and then pasted to the Linux client, a null character (%00) is appended to the end of the string (it's not there if they paste within the RDP session, only if they paste to the Linux client). It was hard to track this down as most programs and sites strip characters like this so it didn't affect everything.

The RDP server is Windows 2012 R2 and the client is Arch Linux (Kernel 4.1.5, FreeRDP 1.2.0-beta1).

@ilammy
Copy link
Contributor

ilammy commented Aug 20, 2015

Actually, sometimes it's not a single character, but a bunch of them (see #2287). I have no idea why Windows does this, but apparently UTF8_STRING format must not include terminating null characters. At least, according to this draft spec (we all know how well X11 is standardized).

I am working on some clipboard improvements in X11 client. ilammy/FreeRDP@a3a7216 should fix the issue with null characters.

@Enverex
Copy link
Author

Enverex commented Aug 21, 2015

Have you submitted that as a pull-request?

@ilammy
Copy link
Contributor

ilammy commented Aug 22, 2015

Not yet. I am going to submit this together with other clipboard-related changes from that branch so that they can be reviewed in one place.

@Enverex
Copy link
Author

Enverex commented Jun 8, 2016

This isn't happening as of current GIT so can now be closed as resolved. Thanks ilammy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants