Gerard ROBIN wrote: > > > >When I receive a message with a attached .docx file, sometime I can > > > >read it with libreoffice and sometime I get: No matching mailcap > > > >entry found. Viewing as text. > > > > > > > >For exemple this file is viewed with libreoffice: > > > > > > > >A Rapport.docx [applica/vnd.openxm, base64, > > > >1,3M] > > > > > > > >but this one is viewed as text: > > > > > > > >A Sortie 1er mai 2012.docx [applica/vnd.openxm, > > > >base64, > > > >17K] > > > > > > > I think you're on the right track though; I'm betting that there is an > > entry but there are no quotes around the %s in that entry, causing the > > system command to fail. > > that's what is there in my mailcap file: > > application/vnd.openxmlformats-officedocument.wordprocessingml.document; > soffice -no-oosplash --writer '%s'; > edit=soffice -no-oosplash --writer '%s'; test=test -n "$DISPLAY"; > description="Office Open XML Document"; nametemplate=%s.docx > > but in fact the spaces in the name of my file does not matter because I have > the same problem with the file attached: > A Cher.docx [applica/vnd.openxm, base64, 16K] > > > Gerard, it would be helpful if you posted the error that mutt displays > > when it fails. > > mutt doesn't fail, it simply can't use libreoffice to display the file > Cher.docx : > > No matching mailcap entry found. Viewing as text. > > Perhaps this is due to the bad quality of some files .docx ?
mutt won't care about the contents of the file, it only looks at the mime type and encoding. In your example above the content-type is truncated. You need to look at the complete content-type string and ensure that it matches what you have in your mailcap.