Torsten, et al -- ...and then Torsten Rosenberger said... % % > So that program is writing \r\n as the newline instead of just \n. It's % > still just your editor that's displaying the ^M. Maybe you should get a new % > editor. % i use vim
Good :-) % % and the input file don't have \r\n they look normal in vim % after the preg_replace in php then they have the ^M I suspect that you have a DOS format file which, after replacement, has a line with only \n (no \r) which makes it a UNIX format file -- with lots of extra \r chars in there. Open your source file with vim. Type :set fileformat and hit return and see what it says (my bet is 'dos'). Type :set fileformat=unix :wq! and then run your script again and check the output (my bet is no more ^M chars). % % BR/Torsten HTH & HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
pgp00000.pgp
Description: PGP signature