[Bug 285831] Re: icon for ms-word file *.doc is "?" instead of ooo-word

Harald Sitter apachelogger at ubuntu.com
Sun Jan 4 23:34:53 UTC 2009


I find it unlikely that this would help in 8.10... my findings so far:

Headers of .doc files differ a lot. Some of the doc files I got were
detected as Windows Installer packages (.msi), some (e.g. exported from
google docs) are correctly recognized as .docs and have the appropriate
icons.

Looking at /usr/share/mime/packages/freedesktop.org.xml (which is the main mimtype definition file) .msi gets partially detected by it's hex-type header
      <match value="\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3E\x00\x03\x00\xFE\xFF\x09\x00\x06" type="string" offset="0"/>

Checking the wrong doc files in Okteta unvealed that they start with
exactly the same sequence, while the ones which were detected correctly
have a completely different header.

Removing the pasted string sequence from mentioned file (and rebuilding
the mime caches) leads to a correct detection for all .docs I have
available for testing.

So the problems appear to be:
* KDE prefers magic matches over extension matches (actually, without having read the mime spec, I would have assumed it chooses extension over magic match if not at least one magic match and the extension apply to the file ... in this case the magic string matches but the file extension does not, so it would use .doc where no magic matches but the file extension does)
* .doc files have different headers of which one is exactly the same as the one used by .msi files
*  it is also possible the .msi mimetype lists a wrong magic string and thus causes the issue

On a side note: xdg-mime query filetype returns the proper mimetype for
all .doc files with default freedesktop.org.xml, so if we assume xdg-
mime is to be taken as reference implementation, ksycoca appears to be
doing something wrong

I'll digg in the appropriate freedestop.org specification and consult
with some fedora developers (in case I can get hold of one ;-) since
they also have an open report about this.

-- 
icon for ms-word file *.doc is "?" instead of ooo-word
https://bugs.launchpad.net/bugs/285831
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to kdebase-runtime in ubuntu.




More information about the kubuntu-bugs mailing list