Bug 357870 - Failure on listing of directory with non-Latin name
Summary: Failure on listing of directory with non-Latin name
Status: RESOLVED FIXED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: default (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR major
Target Milestone: ---
Assignee: Jörg Walter
URL:
Keywords:
: 364210 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-01-11 22:14 UTC by Fabsk
Modified: 2016-07-11 10:21 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabsk 2016-01-11 22:14:26 UTC
Impossible to list the content of directories with non-Latin characters (é, たた).

Reproducible: Always

Steps to Reproduce:
1. Have ssh installed locally.
2. Create a local directory with non-Latin characters (ex: /tmp/é, /tmp/たた)
3. In Dolphin, connect to this directory via fish: fish://myuser@localhost/tmp/たた/

Actual Results:  
A message is displayed that it cannot enter in this directory.
"Could not enter folder fish://myuser@localhost/tmp/たた/"

Expected Results:  
It should list the content of the directory.

* When adding some logs in ".fishsrv.pl", question mark are displayed instead of the non-Latin Characters.
* When manual running ".fishsrv.pl" and executing the "LIST" command, the content of my directories are properly listed.
* In the menu "Tool" of Dolphin, changing the encoding to "utf-8" did not change anything.

Versions:
Version 15.08.2
KDE Frameworks 5.15.0
Ubuntu 15.10
- Ubuntu 15.10
Comment 1 Fabsk 2016-01-11 22:16:52 UTC
Note that I don't have this issue with "sftp" kioslave (but "fish" it twice faster, so it is not a nice workaround).
Comment 2 Dimitris Damigos 2016-03-02 05:45:11 UTC
I would like to confirm this bug.
ArchLinux with all the updates.
Version 15.12.2
KDE Frameworks 5.19.0
Comment 3 Fabsk 2016-05-16 18:49:58 UTC
Moved to kio-extras (where "fish" is located).
Tested again in Kubuntu 16.10 (KDE Frameworks 5.18.0) with the same error.

In the source file "fish.cpp", there is something... fishy. In the function "fishProtocol::writeStdin", there is this line:

qlist.append(line.toLatin1());

I think the fact that the non-latin characters are replaced by question marks come from there. I guess it should be something like that in order to encode to the encoding expected by the remote party:

qlist.append(E(line));

Note that I did not manage (at least for the moment) to execute a patched version of "fish" on my machine in order to verify my theory.

Cheers,
Comment 4 Fabsk 2016-05-16 19:50:23 UTC
On my machine, the modification fixes the problem. Added a review request in Reviewboard.
Comment 5 Albert Astals Cid 2016-05-16 22:05:53 UTC
Git commit 1876df2e3d59c3d0fdee3d3084a07175fc9a00ed by Albert Astals Cid, on behalf of Fabien Shum-King.
Committed on 16/05/2016 at 22:04.
Pushed by aacid into branch 'Applications/16.04'.

fish: Fix bug with directories having a non-latin1 name

REVIEW: 127941

M  +1    -1    fish/fish.cpp

http://commits.kde.org/kio-extras/1876df2e3d59c3d0fdee3d3084a07175fc9a00ed
Comment 6 Christoph Feck 2016-06-12 12:13:15 UTC
*** Bug 364210 has been marked as a duplicate of this bug. ***