I have a new computer loaded with SuSe Linux 10.When I attempt to invoke a program I have successfully used in the past for many years I get the response "cannot execute binary file". The file, (written for me years ago) forming the program has "execute" permission. I understand this means that the operating system realises this is a program, but not a standard binary program file containing machine instructions. I was told the operating system looks for an interpreter program to run it. The interpreter, not containing the expected character sequence, uses the default system interpreter and looks at the first line of the file, finds that it contains non-printable byte values and so condemns it as a binary file.
My program file, as written, contains only printable characters and starts with the identifying #! /bin/sh
It turns out that to the first character in the file there has been added a "Unicode byte-order mark" otherwise known, I am told, as a "zero-width non-breaking space". This by its nature is not a printable character nor a visible one. It is one, however, devilishly difficult to get rid of on a permanent basis. Following directions I tried, starting with the command "locale". The output indeed ended with "UTF8", the initial cause, I understand, of all the trouble. Again following directions I typed "LANG=en_GB" followed by "locale" again and then, using "vi" edited the file. The hated rogue character showed as three components in blue. When, using "x", I got rid of them, I thought I was on top of the problem, but the final stage which I will quote in full defeated me.
This is 'Finally, edit the file $HOME /.bash_profile and insert "LANG=en_GB" or "LC_ALL=en_GB" as appropriate to prevent the problem coming back'. The computer crashed. Moreover, I have not succeeded in locating the file. I suspect I have gone about it in the wrong way. I would be grateful for the exact key strokes required to get the file into "vi".
It seems strange to me that Linux, without my knowledge or my permission should insert a zero-width non-breaking space that not only prevents a program, very important to me (and, no doubt others), from working, but makes it difficult to handle the file because the first byte is not a printable character.
Please forgive my abysmal standard of computer literacy. In mitigation I would point out that I have been in touch with several gurus with, it seems, a total absence of familiarity with the zero-width non-breaking space alias the Unicode byte-order mark.
John Atkinson (Ancient John -- and I do not mind being called that because I now am ancient)
"John atkinson" atk31415@googlemail.com
It turns out that to the first character in the file there has been added a "Unicode byte-order mark" otherwise known, I am told, as a "zero-width non-breaking space". This by its nature is not a printable character nor a visible one. It is one, however, devilishly difficult to get rid of on a permanent basis. Following directions I tried, starting with the command "locale". The output indeed ended with "UTF8", the initial cause, I understand, of all the trouble.
I would expect the byte-order mark shouldn't cause trouble if the whole system is UTF8, which SuSE 10 probably is. What directions are you following?
This is 'Finally, edit the file $HOME /.bash_profile [...]
You may not have that file already, so create it if it doesn't exist.
The slow reply was because most html email goes to the spam folder.
Hope you've solved it already,