Sed line concatenation problem

I have a somewhat bizarre problem when trying to concatenate lines in a file.
Using

cat file.txt | sed -e :a -e '/$/N;s/\n/ /;ta'

the output in file.txt should go from

1
2
3

to

1 2 3

instead I only get the last line or

3

.
I find that if I open the file in gedit and hit delete in front of every line the code works. I don't believe there are any spaces in front of the lines and the code should still work even if there were. What is going wrong? How do I go about fixing this?

tr "\n" " "  < file

Unfortunately this does not work with the file in question. Is there some way to mimic delete at the beginning of every line?

does not work isn't very good response. Show all you have got. error messages etc... if your actual file is not the same as what you posted, then how do you expect to get correct results when people actually work on your sample file?

There were no error messages. It simply doesn't output properly. Here is the actual file
h t t p ://rapidshare.com/files/305361050/lsup.tar.gz.html

cat file.txt |xargs -n3
sed ':a;N;s/\r\n/ /;ta' lsup
tr "\r\n" " " <lsup

The file is in dos format (CR-LF)

Ok Ok I figured out what was going on. This fixed the problem.

cat -v file.txt | tr -d '^M'

Thank you for your patience.