Question: I have received a file as an email attachment from a friend but when I open the file all I get is garbage. What is wrong?
Answer: The file that you have received is probably okay but you are opening it with the wrong program. This probably means that either the program association for the file type of the file is set wrongly on your computer or you don't have a program that is capable of reading files in the format that has been sent. Before you set the program association you should first check that the file can be opened with that program successfully ie. don't check the always use box when testing if a program can open the file.
The first thing to do is to identify what type of file it is that you have received. To do this you need to check what the file type is. This is the last three or so characters after the last dot in the file name. There are thousands of different values that the file type can have depending on the program that created it. In most cases the file can also be opened with similar programs so if we can identify what type of file it is we might have a suitable program to try opening it with.
The type of file may be obvious from the email that the file is attached to. If it isn't obvious from the email then we need to try to work out from the file type which of the programs on our computer are most likely to be able to open the file.
There are several pages on this site that list file types of various sorts. Compressed and encoded formats and how to handle them are listed on the File Downloads and Email Attachments page and there is a long list of many different image file formats on the Choosing a Graphics Format page.
The other common application that the file might belong to is an office suite. The most popular of these is Microsoft Office but there are lots of other cheaper (or free) alternatives and your friend may have used one of these alternatives and sent you a file in the native format of the program that they are using. The following list of file types will help you figure out if this is the case and if so which of the programs in your office suite is most appropriate to use to try to open the file:
You may not be successful in finding a program on your system that will open a given attachment since programs of a given type cannot open all of the formats produced by other programs of the same type but at least having determined the type of file that you have received you will be attempting to open the file in the right type of program and therefore you have at least a possibility that you will be able to get the file to open properly.
There is a good chance that the program that was used to create the file that you have received can also output in other formats. If you don't have any success in opening the file on your system, check out the file formats that the software that you have does support and suggest to the sender of the file that they try converting the file to one of those formats.
Unfortunately, this process of trying to identify the type of file from the suffix isn't foolproof. In some cases the same suffix is used by different programs for totally different file formats. This causes problems in two ways - first if you have both programs on your system you can only associate the suffix with one program so the other can't work properly, second when you receive a file with one of these suffixes you may mis-identify it as being a different format from what it actually is because the other program that uses the same suffix was the one that produced it.
This article written by Stephen Chapman, Felgall Pty Ltd.