If you get an e-mail whose attachment has spaces in its name one has problems dealing with the attachment in Linux. I found a way to deal with them (such as open a pdf file attachment) but I wonder is anyone has a more coherent way to deal with them than I have found.
My way is somewhat hoakie. I am using evolution to read mail.
Aaron Konstam writes:
If you get an e-mail whose attachment has spaces in its name one has problems dealing with the attachment in Linux. I found a way to deal with them (such as open a pdf file attachment) but I wonder is anyone has a more coherent way to deal with them than I have found.
My way is somewhat hoakie. I am using evolution to read mail.
There is nothing particularly bizarre about attachments whose name contains a space. How well it gets handled depends entirely upon what you use to read email. There are several different MIME attributes that different email software may consider when deciding what is the "name" of an attachment, so its entirely possible that you will get completely different results with different software.
On 04/26/2011 10:23 AM, Aaron Konstam wrote:
If you get an e-mail whose attachment has spaces in its name one has problems dealing with the attachment in Linux. I found a way to deal with them (such as open a pdf file attachment) but I wonder is anyone has a more coherent way to deal with them than I have found.
My way is somewhat hoakie. I am using evolution to read mail.
I use thunderbird - and never had a problem saving, reading or whatever.
However, once weird they are saved to disk, I find it annoying to have 'odd' filenames with spaces, punctuation etc - so I wrote a small c-program to rename the files to something more sensible.
Usage: filenameclean <list of files>
Fixes the list of files, or with no args it does all files in the current directory. The rules are in the c-code and pretty obvious. Normal filenames are left alone - it only renames odd filenames.
In the event a renamed file already exists - the program will warn you and do nothing.
This is the program I use (attaching small c code - hope thats ok).
makefile is just
========================================== default: filenameclean
filenameclean: filenameclean.c cc -o filenameclean filenameclean.c ==========================================
gene/
On Tue, 2011-04-26 at 09:23 -0500, Aaron Konstam wrote:
If you get an e-mail whose attachment has spaces in its name one has problems dealing with the attachment in Linux. I found a way to deal with them (such as open a pdf file attachment) but I wonder is anyone has a more coherent way to deal with them than I have found.
My way is somewhat hoakie. I am using evolution to read mail.
You don't explain what these problems are, nor what your solution to them is, so your question is rather hard to address.
poc
On Tue, 2011-04-26 at 11:23 -0430, Patrick O'Callaghan wrote:
On Tue, 2011-04-26 at 09:23 -0500, Aaron Konstam wrote:
If you get an e-mail whose attachment has spaces in its name one has problems dealing with the attachment in Linux. I found a way to deal with them (such as open a pdf file attachment) but I wonder is anyone has a more coherent way to deal with them than I have found.
My way is somewhat hoakie. I am using evolution to read mail.
You don't explain what these problems are, nor what your solution to them is, so your question is rather hard to address.
poc
Ok, I thought the problem is obvious. It is the same problem one has if you apply any Linux program to such a file. In this case the attachment file was: Konstam plan description.pdf
When I try to open it with Adobe Reader it tried to open a file called Konstam which it claimed was a Binary file.
I am not sure that my solution would work consistently. I pretended to forward the file in a way that the attachment was still present. The attachment here was in a more tractable form which allowed me to insert extra characters to allow me to open the file. However, the e-mail was wrapped in a security envelope so I don't know whether what I did would work with a normal e-mail.
On Tue, 2011-04-26 at 16:46 -0500, Aaron Konstam wrote:
On Tue, 2011-04-26 at 11:23 -0430, Patrick O'Callaghan wrote:
On Tue, 2011-04-26 at 09:23 -0500, Aaron Konstam wrote:
If you get an e-mail whose attachment has spaces in its name one has problems dealing with the attachment in Linux. I found a way to deal with them (such as open a pdf file attachment) but I wonder is anyone has a more coherent way to deal with them than I have found.
My way is somewhat hoakie. I am using evolution to read mail.
You don't explain what these problems are, nor what your solution to them is, so your question is rather hard to address.
poc
Ok, I thought the problem is obvious. It is the same problem one has if you apply any Linux program to such a file. In this case the attachment file was: Konstam plan description.pdf
When I try to open it with Adobe Reader it tried to open a file called Konstam which it claimed was a Binary file.
Still very unclear. You really need to describe exactly what you're doing and what happens. I just checked and I can both send and receive an attachment called "foo bar" using Evo. In fact I also sent it to myself from Gmail and opened it using Evo with no issues.
So the problem isn't with spaces in the name, as you seem to imply. If Adobe Reader claims "Konstam" is a binary file, my first reaction is to ask why it's opening "Konstam" and not "Konstam plan description.pdf", which is the file's actual name and which should work in any Linux program.
My second reaction is to wonder whether the call to Adobe is actually a poorly-coded Shell script which doesn't allow for spaces in the name. If so, that would be easy to fix.
My third reaction is that maybe you have a different file called "Konstam" which Adobe can't open.
My fourth reaction is that maybe someone sent the file without the proper MIME Content-Type header, which could explain part of the problem but not all of it.
However all of this is hypothetical without more information.
poc
On Tuesday, April 26, 2011 05:46:57 pm Aaron Konstam wrote:
On Tue, 2011-04-26 at 11:23 -0430, Patrick O'Callaghan wrote:
On Tue, 2011-04-26 at 09:23 -0500, Aaron Konstam wrote:
If you get an e-mail whose attachment has spaces in its name one has problems dealing with the attachment in Linux. I found a way to deal with them (such as open a pdf file attachment) but I wonder is anyone has a more coherent way to deal with them than I have found.
My way is somewhat hoakie. I am using evolution to read mail.
You don't explain what these problems are, nor what your solution to them is, so your question is rather hard to address.
poc
Ok, I thought the problem is obvious. It is the same problem one has if you apply any Linux program to such a file. In this case the attachment file was: Konstam plan description.pdf
When I try to open it with Adobe Reader it tried to open a file called Konstam which it claimed was a Binary file.
Seems to me that Adobe Reader (probably its launcher script) has a bug that doesn't work properly with filename that has spaces. Try opening it with something else, e.g. evince or okular and see if the problem is application dependent.
AC
On 04/28/2011 08:44 AM, Armelius Cameron wrote:
On Tuesday, April 26, 2011 05:46:57 pm Aaron Konstam wrote:
On Tue, 2011-04-26 at 11:23 -0430, Patrick O'Callaghan wrote:
On Tue, 2011-04-26 at 09:23 -0500, Aaron Konstam wrote:
If you get an e-mail whose attachment has spaces in its name one has problems dealing with the attachment in Linux. I found a way to deal with them (such as open a pdf file attachment) but I wonder is anyone has a more coherent way to deal with them than I have found.
My way is somewhat hoakie. I am using evolution to read mail.
You don't explain what these problems are, nor what your solution to them is, so your question is rather hard to address.
poc
Ok, I thought the problem is obvious. It is the same problem one has if you apply any Linux program to such a file. In this case the attachment file was: Konstam plan description.pdf
When I try to open it with Adobe Reader it tried to open a file called Konstam which it claimed was a Binary file.
Seems to me that Adobe Reader (probably its launcher script) has a bug that doesn't work properly with filename that has spaces. Try opening it with something else, e.g. evince or okular and see if the problem is application dependent.
I see no problem at all opening such file names with Adobe Reader 9.4.2.
<snip>
In this case the attachment file was: Konstam plan description.pdf
When I try to open it with Adobe Reader it tried to open a file called Konstam which it claimed was a Binary file.
Seems to me that Adobe Reader (probably its launcher script) has a bug that doesn't work properly with filename that has spaces. Try opening it with something else, e.g. evince or okular and see if the problem is application dependent.
I see no problem at all opening such file names with Adobe Reader 9.4.2.
-- Bob Nichols "NOSPAM" is really part of my email address. Do NOT delete it.
Ok, I was wrong in describing the problem. Opening the file with spaces in its name works with e-mail in general but doesn't with the a particular type of secure mail I received. So it is not problem to be discussed further here.