Bug 375956 - Wrong mime type for the files with non-ascii characters
Summary: Wrong mime type for the files with non-ascii characters
Status: RESOLVED UPSTREAM
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-03 14:54 UTC by Tarik
Modified: 2017-02-21 17:00 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot (15.73 KB, image/png)
2017-02-03 14:54 UTC, Tarik
Details

Note You need to log in before you can comment on or make changes to this bug.
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