| Summary: | Krusader (normal_vfs) does not handle unicode file names properly on mounted NTFS drives | ||
|---|---|---|---|
| Product: | [Applications] krusader | Reporter: | Pete <kde> |
| Component: | general | Assignee: | Krusader Bugs Distribution List <krusader-bugs-null> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | major | CC: | alex.bikadorov, cpigat242, krusader-bugs-null, simon.persson |
| Priority: | NOR | ||
| Version First Reported In: | Git | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
Fixes umlauts in file systems with different charsets
Screenshot of the issue (in the path field, names are correctly shown) This seems to fix all issues |
||
Created attachment 88327 [details]
Screenshot of the issue (in the path field, names are correctly shown)
The fix does only fix the listing of the folder, however the folder is still not accessible. I do not know how to fix this. Created attachment 88359 [details]
This seems to fix all issues
As KDE Dolphin showed correct umlauts in the file names and all folders were accessible, I studied their source and adopted the behavior to konqueror.
Instead of using toLocal8Bit, Dolphin uses the QFile::encode/decodeName() methods.
Files and folders with umlauts on mounted NTFS drives are now accessible. However opening these URLs in Chrome or VLC still results in encoding issues, but KDE's native apps all seem to work fine. If I fix the encoding of the url to work in Chrome or VLC, all the native KDE apps start complaining. So there might be some deeper issues.
At least in Qt5, QFile::encodeName() looks like this:
static inline QByteArray encodeName(const QString &fileName)
{
return fileName.toLocal8Bit();
}
So for sure there would be no point in using this patch nowadays (on Qt5 version of krusader I mean, and it currently does not look like anybody will be releasing any more version of the Qt4 code).
If a filesystem has filenames encoded in a different character encoding than the system, it would have to be specified as a mount option I believe, either detected automatically by system software (udisks or such) or specified manually. I don't think there is anything thatKrusader should be doing to fix those situations.
But I'm not confident enough about that, so I'll leave this bug open. Needs more research.
tested filenames with umlauts on NTFS partition, works fine here. If I remember right there was always a problem with Windows FS encodings: ISO8859-1 versus UTF. But this is not related to Krusader. |
Created attachment 88326 [details] Fixes umlauts in file systems with different charsets I'm using Ubuntu 14.04 and initially the krusader package. However, when mounting my NTFS drives through KDE's dolphin, file names with umlauts were shown wrong in Krusader (but correctly in Dolphin). I downloaded the git master and skimmed through VFS/normal_vfs.cpp and found name = QString::fromLocal8Bit(dirEnt->d_name); I assumed that the file names from the NTFS drive were not Local8Bit and this is were the error comes from. I downloaded the dolphin sources to see how it is handled there which brings us to: name = QFile::decodeName(dirEnt->d_name); I recompiled the sources and the error was gone. TLDR: Krusader list panel expects 8Bit string for file names and therefore does not work with different charsets. Added a patch.