I would hazard a guess that for some reason your ftp program is still transferring it as a binary, perhaps because it doesn't recognize the extension on the file as one to handle as a text file. To determine this, I can think of several ways:
- try od -c filename, and look for '\r\n' pairs
- open it in vi, where you would see ^M on the end of the line ( ':q' to exit )
- upload the first version, then try perl -p -i -e 's/\r//g' filename -if it works after this (which removes the character in question), then it is indeed uploading it as binary (this also works to fix the problem, if you want to continue to use TextPad and don't mind the extra step).
Hope that helps.