View previous topic :: View next topic |
Author |
Message |
atzengi25atn n00b
Joined: 22 Jan 2012 Posts: 14
|
Posted: Thu Feb 02, 2017 2:09 pm Post subject: Wrong mime type for the files with non-ascii characters |
|
|
Hello everyone,
Facing a strange problem in Dolphin recently.
I don't know since when it started.
For some pdf files for instance, when they have some specific non-ascii character in the filename, Dolphin does not detect the mime type correctly.
For example I have made 10 copies of the same pdf file and renamed them as they include some of the characters like "İ", "Ş", etc.
The most problematic one in my experience is the dotted capital I "İ".
When I list them in the folder they all look normal as follows,
Code: | $ ls -al
total 46616
drwxr-xr-x 2 tarik tarik 4096 Feb 2 17:03 .
drwxr-xr-x 24 tarik tarik 12288 Feb 2 16:55 ..
-rw-r--r-- 1 tarik tarik 4770450 Jan 30 14:33 ABC.pdf
-rw-r--r-- 1 tarik tarik 4770450 Jan 30 14:33 AİİA.pdf
-rw-r--r-- 1 tarik tarik 4770450 Jan 30 14:33 DEF.pdf
-rw-r--r-- 1 tarik tarik 4770450 Jan 30 14:33 GHI.pdf
-rw-r--r-- 1 tarik tarik 4770450 Jan 30 14:33 İAEİ.pdf
-rw-r--r-- 1 tarik tarik 4770450 Jan 30 14:33 İAİ.pdf
-rw-r--r-- 1 tarik tarik 4770450 Jan 30 14:33 İİ.pdf
-rw-r--r-- 1 tarik tarik 4770450 Jan 30 14:33 İŞLİ.pdf
-rw-r--r-- 1 tarik tarik 4770450 Jan 30 14:33 İŞŞİ.pdf
-rw-r--r-- 1 tarik tarik 4770450 Jan 30 14:33 JKL.pdf
$ file *
ABC.pdf: PDF document, version 1.4
AİİA.pdf: PDF document, version 1.4
DEF.pdf: PDF document, version 1.4
GHI.pdf: PDF document, version 1.4
İAEİ.pdf: PDF document, version 1.4
İAİ.pdf: PDF document, version 1.4
İİ.pdf: PDF document, version 1.4
İŞLİ.pdf: PDF document, version 1.4
İŞŞİ.pdf: PDF document, version 1.4
JKL.pdf: PDF document, version 1.4
|
Dolphin shows the one with "İ"s in their name as "pascal source code" files though.
Screenshot : http://imgur.com/a/kROEQ
All the files are identical except their filenames.
What do you think I should check first? |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2038 Location: United Kingdom
|
Posted: Fri Feb 03, 2017 12:52 am Post subject: |
|
|
Strange indeed. I don't experience that in my installation. I wonder if something is messed up in the file associations in your installation? Have you checked 'System Settings' > 'Applications' > 'File Associations'? If you enter 'pascal' in the box 'Find file type or filename pattern' you should see the following under 'Known Types' if you expand the '>-text' entry:
Quote: | v-text
....└·P x-pascal |
What applications are listed in the 'Application Preference Order' box if you select x-pascal?
Likewise, what do you get when you enter 'pdf' in the box 'Find file type or filename pattern'? _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.
My blog |
|
Back to top |
|
|
atzengi25atn n00b
Joined: 22 Jan 2012 Posts: 14
|
Posted: Fri Feb 03, 2017 8:28 am Post subject: |
|
|
Thank you @Fitzcarraldo.
I can see the x-pascal as you mentioned having the extensions *.p and *.pas
The applications listed are Kate, Kwrite, Libreoffice Writer, etc.
The "pdf" mime type, it also appears under the "application" category and has the *.pdf extension only.
The applications associated are Okular, gimp, etc.
Generally I don't have a problem with these file types.
Those which have the problem turn OK when I change their name to an ascii character.
Can you rename a file in your system as shown in my first message please?
Does it react the same? |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2038 Location: United Kingdom
|
Posted: Fri Feb 03, 2017 9:28 am Post subject: |
|
|
Before making my first post I renamed a PDF file to AIA.pdf and then to AİA.pdf (I with a dot above it). The 'file' command and Dolphin showed both files as being PDF files.
However, as you requested me to rename a file as shown in your first post, I have renamed a PDF file to AIIA.pdf and then to AİİA.pdf (two 'I's with a dot above each). And, yes, I see the same as you! Dolphin indicates the file type is 'Pascal source code', but the 'file' command shows the PDF file type correctly:
Code: | fitzcarraldo@clevow230ss ~/Documents $ file AIIA.pdf
AIIA.pdf: PDF document, version 1.4
fitzcarraldo@clevow230ss ~/Documents $ file AİİA.pdf
AİİA.pdf: PDF document, version 1.4 |
So Dolphin reports the file type of AİA.pdf (one 'İ') correctly but not AİİA.pdf (two 'İ's). That is bizarre.
In 'System Settings' > 'File Associations' in my installation I notice that the list of applications for x-bzpdf and x-gzpdf includes PeaZip. As it happens, PeaZip is written in Free Pascal. I wonder if that has something to do with it. Anyway, it looks to me like a bug in Dolphin or somewhere else in KDE. Perhaps you should file a bug report in the KDE Bug Tracking System. _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.
My blog |
|
Back to top |
|
|
atzengi25atn n00b
Joined: 22 Jan 2012 Posts: 14
|
Posted: Fri Feb 03, 2017 2:58 pm Post subject: |
|
|
I have found other file types affected with this. Most probably there are more.
Try these please;
ABC.pdf -> AİİA.pdf
ABC.odt -> AİİA.odt
ABC.docx -> AİA.docx
Renamed pdf file appears as Pascal Source Code, odt file appears as Object Code, and docx file appears as Zip Archive. Really weird.
docx is affected only with one "İ". It seems OK with double "İ"s. Another weirdness.
By the way, I have filed the bug here : https://bugs.kde.org/show_bug.cgi?id=375956 |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2038 Location: United Kingdom
|
Posted: Fri Feb 03, 2017 3:37 pm Post subject: |
|
|
1. ABC.pdf -> AİİA.pdf
2. ABC.odt -> AİİA.odt
3. ABC.docx -> AİA.docx
4. ABC.docx -> AİİA.docx
In my case, Dolphin shows the original files above as, respectively, the following:
1. PDF document.
2. ODT document.
3. Word 2007 document.
4. Word 2007 document.
In my case, Dolphin shows the renamed files above as, respectively, the following:
1. Pascal source code.
2. object code.
3. Zip archive.
4. Word 2007 document.
In other words, exactly the same as you see. _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.
My blog |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2038 Location: United Kingdom
|
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Sat Feb 04, 2017 2:47 pm Post subject: |
|
|
Code: | * Searching for xdg-mime ...
x11-misc/xdg-utils-1.1.1-r1 (/usr/bin/xdg-mime)
xdg-mime query filetype AİİA.pdf
application/pdf
* x11-misc/shared-mime-info
Latest version available: 1.8
Latest version installed: 1.8
|
If it help you. |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2038 Location: United Kingdom
|
Posted: Tue Feb 28, 2017 12:33 am Post subject: |
|
|
Apparently it is a bug in Qt5 and is fixed in Qt 5.8.1:
https://bugreports.qt.io/browse/QTBUG-58822 _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.
My blog |
|
Back to top |
|
|
|