^M in yii files

Some lines (entire file in some cases) in Yii files end with ^M.

I don't know if this can be a problem, but.


This won't be a problem. The only issue is about yiic, which is already fixed.

I know that it's not a problem but there are more file with this carriage return char (ex: framework/validators/).

I'm looking your code and ^M at end of lines hurt my eyes hehehe

This script can help you to do a mass find and replace:


Yeah, that may be a problem for unix/linux users, but you may overcome it by setting your editors.

If we remove those ^M, it would also pose problems for some Windows users. So there is really not perfect solutions here.

Actually, most windows editors (notepad.exe being the only exception i know of) are working just fine with UNIX style newlines, so do ALL editors on Mac and Linux.

It's just that most editors on Mac and Linux show the ^M (aka CRLF), which is useless to PHP anyway and requires one additional byte (or two in UTF-8 encoded files) for every single line of code, whitespace or comment. Also, in most editors, there is no option to just hide the ^M. One usually has to convert the file from DOS to Unix format or has to remove them manually using search and replace.

Today there is not even one single good reason to have the PHP sources in DOS format, unless the majority of developers would use notepad.exe for development or would transfer ASCII files through telnet streams.

Therefore please remove that ^M from all files.

Greetings from Hamburg / Germany

  • rojaro -

PS. I do web development development on Windows, Linux and Mac, so on two out of three different systems, this is actually really annoying for me.

Ok, i'm convinced. will do it.