Bug 433410 - Filenames with newline characters are not readable
Summary: Filenames with newline characters are not readable
Status: REOPENED
Alias: None
Product: krusader
Classification: Applications
Component: general (show other bugs)
Version: 2.7.2
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Krusader Bugs Distribution List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-22 01:02 UTC by Dan Dascalescu
Modified: 2024-12-22 22:49 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Strange long filename wrapping in Krusader (11.40 KB, image/png)
2021-02-22 01:02 UTC, Dan Dascalescu
Details
Dolphin rendering the long filename (10.63 KB, image/png)
2021-02-23 00:48 UTC, Dan Dascalescu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Dascalescu 2021-02-22 01:02:10 UTC
Created attachment 136027 [details]
Strange long filename wrapping in Krusader

I have a file named "Oxalate content and calcium binding capacity of tea and
herbal teas.pdf". It ends up being wrapped as seen in the screenshot, even though there's plenty of space in the Name column, and even if there weren't, the filename shouldn't be wrapped.

As a result, I can't see the filename (unless I press F2 to rename it).
Comment 1 Toni Asensi Esteve 2021-02-22 22:30:59 UTC
Maybe the name of the file has a "carriage return" inside. If you use Dolphin, do you see the same?
Comment 2 Dan Dascalescu 2021-02-23 00:48:30 UTC
Created attachment 136067 [details]
Dolphin rendering the long filename

Good hunch! `ls` revealed there was indeed a \n before " herbal", which Dolphin treated as a regular space in view mode, and as a line break when renaming the file.

Perhaps Krusader could do the same?
Comment 3 Dan Dascalescu 2021-02-23 00:49:36 UTC
Sorry, Dolphin treated the \n as ''. Here's the `ls` output:

'Oxalate content and calcium binding capacity of tea and'$'\n''herbal teas.pdf'
Comment 4 Nikita Melnichenko 2021-02-23 08:42:23 UTC
(In reply to Dan Dascalescu from comment #2)
> Perhaps Krusader could do the same?
IMO, it shouldn't. You have a newline in the file name, this is allowed by the FS, but usually is not desired and Krusader helps you to find the issue. We should show these file names as is (expanding the row to include the contents though).
Comment 5 Dan Dascalescu 2021-02-23 10:18:47 UTC
> expanding the row to include the contents though

SGTM. Should then Dolphin do the same?
Comment 6 Bug Janitor Service 2021-03-10 04:33:44 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 7 Roke Julian Lockhart Beedell 2022-06-30 08:36:10 UTC
(In reply to Dan Dascalescu from comment #5)
> > expanding the row to include the contents though
> 
> SGTM. Should then Dolphin do the same?

I believe that it should, because we should not arbitrarily substitute characters, especially those that may obfuscate what the filename actually contains. Consequently, is addition of Dolphin as another affected component (because it is, even if the title remains technically possible to observe via Dolphin) to this report possible, or must this be duplicated?
Comment 8 Alex Bikadorov 2024-12-05 18:10:13 UTC
I'm closing this because the behavior in Krusader is considered fine.

If you want that Dolphin shows newline characters in filenames, please create a new bug report.
Comment 9 Roke Julian Lockhart Beedell 2024-12-05 21:50:35 UTC
(In reply to Alex Bikadorov from comment #8)  
> I'm closing this because the behavior in Krusader is considered fine.  
That doesn't make much sense. As https://bugs.kde.org/attachment.cgi?id=136027&action=edit demonstrates, the filename isn't actually visible. The wrapping itself isn't the problem - merely the fact that the wrapping renders the filename unreadable. I presume that Dolphin does not render newlines to avoid this.

> If you want that Dolphin shows newline characters in filenames, please create a new bug report.
Yeah, ignore https://bugs.kde.org/show_bug.cgi?id=433410#c7. It and the preceding reponses are off-topic for this report.
Comment 10 Alex Bikadorov 2024-12-07 13:36:25 UTC
Okay, reopening.

I like the solution in Dolphin: Newline characters are displayed as "↩" symbol (U+21A9).
Comment 11 Toni Asensi Esteve 2024-12-22 22:49:14 UTC
> I like the solution in Dolphin: Newline characters are displayed as "↩" symbol (U+21A9).
Yes, it looks like a good idea.