On Wed, Apr 25, 2012 at 07:18:17AM +0100, Chris Burdess wrote: > Date: Wed, 25 Apr 2012 07:18:17 +0100 > From: Chris Burdess <[email protected]> > To: Gerard ROBIN <[email protected]> > Cc: [email protected] > Subject: Re: can't read attached file docx > X-Mailer: Evolution 3.2.2-1 > > 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.
Chris ===== I did this experiment: 1 I saved the attached file Cher.docx (that I see correctly with libreoffice.) 2 I sent to myself a message with the file Cher.docx as an attachment. 3 I downloaded this message, the I opened the attached file (in mutt) and this time it is libreoffice that opens the file Cher.docx. (as expected) Conclusion: it is the one who sends me the message that causes the problem. Is my reasoning correct ? Macelo ====== I encounter the same problem as you: If a file is already open with libreoffice I can not open the attachment Cher.docx (with mutt) I get the message of libreoffice: /home/user/.tmp/Cher.docx doesn't exist. But when I close libreoffice I can read the file Cher.docx with libreoffice (with mutt as an attachment) -- Gérard
