Bug 375956

Summary: Wrong mime type for the files with non-ascii characters
Product: [Applications] dolphin Reporter: Tarik <tarik.zengin>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: elvis.angelaccio, faure, rdieter
Priority: NOR    
Version: 16.12.2   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=99672
https://bugreports.qt.io/browse/QTBUG-58822
Latest Commit: Version Fixed In:
Attachments: Screenshot

Description Tarik 2017-02-03 14:54:07 UTC
Created attachment 103789 [details]
Screenshot

Dolphin fails to detect the mime type of the file when there are some specific characters in the file name.

How to reproduce:
Get any file (preferable a pdf, odt, docx, etc.) and copy/rename it as follows.

ABC.pdf -> AİİA.pdf
ABC.odt -> AİİA.odt
ABC.docx -> AİA.docx

(Beware the dotted I)!

Check the files in Dolphin.
Renamed pdf file appears as Pascal Source Code, odt file appears as Object Code, and docx file appears as Zip Archive.
Screenshot can be seen in the attachment.
Comment 1 Elvis Angelaccio 2017-02-04 10:41:47 UTC
Thanks for the report, I have forwarded the issues to upstream shared-mime-info.
Comment 2 Rex Dieter 2017-02-12 15:10:37 UTC
$ kmimetypefinder5 AİİA.pdf 
text/x-pascal

It's not an xdg-utils bug, it relies in kmimetypefinder(5)
Comment 3 Rex Dieter 2017-02-12 15:17:32 UTC
And looking at kmimetypefinder5, looks like it's a thin wrapper for QMimeType class, so this may well be a Qt5 bug.


Fwiw, kde4's kmimetypefinder seems to get it right:
$ kmimetypefinder AİİA.pdf 
application/pdf
(accuracy 100)
Comment 4 Elvis Angelaccio 2017-02-12 22:27:31 UTC
Yep, I can reproduce with a minimal Qt test case. Reported upstream.
Comment 5 David Faure 2017-02-21 17:00:29 UTC
For the record, fixed in https://bugreports.qt.io/browse/QTBUG-58822