Bug 439002

Summary: Text which contains NULL character (utf-8: 00) gets cut off sometimes
Product: [Plasma] plasmashell Reporter: Daniel <daniel-other+kdebug>
Component: Clipboard widget & pop-upAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate
Priority: NOR    
Version First Reported In: 5.27.8   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.2
Sentry Crash Report:
Attachments: a text file, with real world text containing a Null character in the word "signicant"
a demonstration of the bug. (ignore the half pasted line at 00:09, it was still in the selection clipboard from earlier)

Description Daniel 2021-06-21 16:37:48 UTC
Created attachment 139578 [details]
a text file, with real world text containing a Null character in the word "signicant"

SUMMARY
When you copy text, which to whatever reason, contains an Null character, when you paste it, it is cut off at that position

STEPS TO REPRODUCE
1. Open the attached file in a text editor.
2. Copy it
3. Paste it

OBSERVED RESULT
Only the text before the Null character is copied sometimes

EXPECTED RESULT
The whole text, including the Null character should be copied. The Null char shouldn't be interpreted in the clipboard/selection clipboard

After trying it some more, I can see it doesn't happen everytime. There is probably some issue with the underlying datastructure.

(For reference, the real world text is from https://assets.researchsquare.com/files/rs-580444/v1/9ef6fa0d-9c34-4dd7-9612-ba140ffe8e9b.pdf)
Comment 1 Daniel 2021-06-21 16:41:21 UTC
Created attachment 139579 [details]
a demonstration of the bug. (ignore the half pasted line at 00:09, it was still in the selection clipboard from earlier)
Comment 2 Nate Graham 2023-09-19 20:21:38 UTC
Hello and thank you again for the bug report! Unfortunately we were not able to address it yet, nor even manage to reproduce the issue ourselves. Can we ask you to please check if this issue is still happening with Plasma 5.27?

If it is, please change the status to REPORTED. Thanks a lot!
Comment 3 Bug Janitor Service 2023-10-04 03:46:52 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Daniel 2023-10-05 21:54:24 UTC
Just checked with Plasma 5.27.8 and it still happens when doing the steps to reproduce from comment #0
Comment 5 Nate Graham 2024-08-20 16:39:08 UTC
Thanks again, and sorry once more that the responsiveness is very poor here. We are overwhelmed with bug reports.

I cannot reproduce the issue in current git master; if I copy that text, I see the null character in the clipboard as expected. Therefore, let's assume it's fixed in Plasma 6.2.

However, if after upgrading to Plasma 6.2 yourself, you find that you can still reproduce the issue, feel free to re-open this and I'll investigate it more deeply.