local file ^M Help

FreeBSD local wget to download the file encoding ^M appears the same program Linux wget normal regardless of my local or remote upload files all ^M signed binary uploads also like. Will FreeBSD require local set?
Sorry my bad English, I use Google Translate.
PHP:
<?php^M
^M
/**^M
 *
Code:
PHP script, ASCII text, with CRLF line terminators
 
The text files have been written on a Windows machine, it has nothing to do with wget. Windows uses a Carriage Return (\r; shows up as a ^M) and a Linefeed (\n) whereas unix typically only uses a Linefeed. It might be possible that wget(1) can translate it automatically, I don't know, I don't use wget. I suggest you have a look in the wget(1) man page.
 
pengtai said:
PHP script, ASCII text, with CRLF line terminators
And in addition to SirDice's comment above; if this really bothers you then you could consider using the dos2unix conversion program. As can be expected you can install it using the Ports collection, just grab converters/unix2dos.
 
Yet another option... If you already have editors/emacs installed, you can run M-x set-buffer-file-coding-system and choose undecided-unix. This will get rid of the carriage returns.
 
Back
Top