Bug 393740

Summary: Title bar doesn’t handle soft hyphens – rendered as spaces
Product: [Plasma] kwin Reporter: Karl Ove Hufthammer <karl>
Component: decorationsAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: epost.kde
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Screenshot showing soft hyphen displayed as a space
Text file with soft hyphen in filename

Description Karl Ove Hufthammer 2018-05-01 18:35:29 UTC
Created attachment 112352 [details]
Screenshot showing soft hyphen displayed as a space

[I’m not sure if this is the right component, or even product, so feel free to reassign.]

Observed behaviour:
If the text in the title bar contains a soft hyphen (i.e. Unicode character U+00AD), this is displayed as a space.

Expected behaviour:
The soft hyphen should be invisible.
(A soft hyphen should always be invisible unless it word is broken over two lines, where it magically turns into an ordinary hyphen).

Use case:
In our (Norwegian Nynorsk) translation of the system settings modules, we have many long (compound) words, and we use soft hyphens to ensure that module names can be displayed properly, i.e. hyphenated over several lines. For example, the module name ‘Skrivebords­effektar’ (‘Desktop Effects’) has a soft hyphen between ‘Skrivebords’ and ‘effektar’, ensuring that it is displayed as

Skrivebords-
effektar

if the word needs to be broken over two lines. This works very well. But the module name is also shown in the title bar, and there the soft hyphen seems to be replaced by a space, ‘Skrivebords effektar’, which is wrong.

I’ll attach a screenshot showing the problem.
Comment 1 Karl Ove Hufthammer 2018-05-01 18:38:24 UTC
Created attachment 112353 [details]
Text file with soft hyphen in filename

Here’s a file to easily reproduce the bug. It’s called ‘skrivebords­effektar.txt’, with a soft hyphen between ‘skrivebords’ and ‘effektar.txt’.

Steps to reproduce bug:

1. Open the file in Kate, Kwrite or another editor that shows the file name in the title bar.
2. Note that the title bar says ‘Skrivebords effektar.txt’ instead of ‘Skrivebordseffektar.txt’.
Comment 2 Karl Ove Hufthammer 2018-05-01 18:42:15 UTC
(Note that downloading the attachment using Chromium doesn’t work, as it replaces the soft hyphen with an underscore. But downloading it using Firefox works fine.)
Comment 3 Martin Flöser 2018-05-01 18:53:03 UTC

*** This bug has been marked as a duplicate of bug 376813 ***