Summary: | Wrong character representation in file names with slash | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | Simone <s.scalabrino9> |
Component: | general | Assignee: | David Faure <faure> |
Status: | REPORTED --- | ||
Severity: | normal | CC: | a.samirh78, alexh.public+kde, bugs.kde, bugseforuns, elvis.angelaccio, kde, kdelibs-bugs, nate |
Priority: | NOR | ||
Version: | 5.51.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Bug Depends on: | 309192 | ||
Bug Blocks: | |||
Attachments: | Example of file name |
The slash character is forbidden in filenames, because it is the UNIX directory separator. It gets replaced with the 'fraction slash' (U+2044), which in turn causes the Qt rendering engine to render fractions, if there are digits to the left and the right of the slash. Could be replaced with 'division slash' (U+2215), which should not cause fraction composition, but could cause users getting unable to find their files. *** Bug 421511 has been marked as a duplicate of this bug. *** I think the code should just disallow using '/' in file names, silently replacing it with the fraction slash is probably going to cause issues like the one reported here. For dir names, the code in KNewFileMenu simply creates sub-dirs if it detects '/' in the name, and it informs the user about that. The rendering as a fraction was never intended. I suggest we change this to division slash as suggested by Christoph. This allows users to not hit restrictions with using some sort of '/' in filenames. Useful for "Documents / Files" and useful for URLs like "http://www.kde.org". |
Created attachment 115975 [details] Example of file name When I use "/" in a file name, for example "test 1/2/3", the characters do not appear as they are intended (in the example, I see something like "test ½/3", see the attachment). STEPS TO REPRODUCE 1. Create a new file with name "test 1/2/3" OBSERVED RESULT The file name is not rendered correctly (something similar to "test ½/3") EXPECTED RESULT The correct rendering would be "test 1⁄2⁄3", with the "⁄" character instead of "/". As an alternative, I would expect an error. SOFTWARE VERSIONS Distribution: Arch Linux KDE Plasma Version: 5.14.2 KDE Frameworks Version: 5.51.0 Qt Version: 5.11.2