Bug 343380

Summary: Invalid path is passed to the application when opening a file which filename containing Unicode character 'IDEOGRAPHIC SPACE' (U+3000) in Dolphin File Manager
Product: [Frameworks and Libraries] kdelibs Reporter: V字龍(Vdragon) <Vdragon.Taiwan>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: aacid, simonandric5
Priority: NOR    
Version: 4.14.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 4.14.6
Attachments: File that can reproduce bug

Description V字龍(Vdragon) 2015-01-27 17:41:13 UTC
Refer to reproduce steps.

Reproducible: Always

Steps to Reproduce:
1. Name a PDF file to contain Unicode character 'IDEOGRAPHIC SPACE' (U+3000) " "
2. Open the PDF file using Okular

Actual Results:  
File fails to open with "Could not open <file path>" error

Expected Results:  
File opens normally
Comment 1 V字龍(Vdragon) 2015-01-27 17:42:17 UTC
Created attachment 90708 [details]
File that can reproduce bug
Comment 2 V字龍(Vdragon) 2015-01-27 18:27:16 UTC
Found that the issue is actually on Dolphin instead, Okular just get the wrong file path.
Comment 3 V字龍(Vdragon) 2015-01-27 18:41:33 UTC
## UPDATE of "Actual results":
### If Unicode character 'IDEOGRAPHIC SPACE' (U+3000) appears at the start of a filename (e.g. " test.pdf")
Application get the file path without Unicode character 'IDEOGRAPHIC SPACE' (U+3000) (e.g. "test.pdf"

### If Unicode character 'IDEOGRAPHIC SPACE' (U+3000) appears at the middle of a filename (e.g. "te st.pdf"
Application get "te" and "st.pdf" two arguments and fails twice

### If Unicode character 'IDEOGRAPHIC SPACE' (U+3000) appears at the end of a filename (e.g. "test.pdf "
Application get the file path without Unicode character 'IDEOGRAPHIC SPACE' (U+3000) (e.g. "test.pdf"
Comment 4 V字龍(Vdragon) 2015-01-27 19:41:39 UTC
I noticed that this issue is also reproducible with kde-open, but I'm not sure which KDE product it belongs to(In Kubuntu Backports the command is packaged in kde-runtime)
Comment 5 Albert Astals Cid 2015-01-28 23:06:07 UTC
Yeah it's not an okular bug, but i'm working on a fix anyways