Bug 290786

Summary: Cannot rename files when filename encoding is broken
Product: [I don't know] kde Reporter: Martin Runge <martin.runge>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: adaptee
Priority: NOR    
Version: 4.7   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: You can select the file with broken filename and give it a new name, but rename will fail.

Description Martin Runge 2012-01-06 11:11:45 UTC
Created attachment 67505 [details]
You can select the file with broken filename and give it a new name, but rename will fail.

Version:           4.7 (using KDE 4.7.4) 
OS:                Linux

When a filename contains invalid characters because of wrong encoding, it is not possible to rename these files in the KDE File Open dialog or a filemanager like dolphin.


Reproducible: Always

Steps to Reproduce:
1. Create a file and break its filename's encoding:

> touch äöü.txt
> ls
äöü.txt
> convmv -f utf8 -t iso8859-1 --notest  äöü.txt
> ls 
???.txt

2. Try to rename that file with any KDE application.

Actual Results:  
E.g. KDE File dialog -> properties -> change filename back to äöü.txt (or any other filename without non ascii chars) will fail with the message: "no such file '???.txt'"

Dolphin fails, too.

Expected Results:  
It should be possible to rename all files that are displayed and are selectable.
It works with mc.
In the shell it is difficult to name the file with broken filename, but if you can specify a wildcard that expands to a single name it works: 

mv *.txt äöü.txt   # works as long as *.txt expands to a single file.
Comment 1 Jekyll Wu 2012-01-06 12:46:00 UTC
I think this is the same issue as bug 165044. Also see bug 204768.

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