문제

Recently when I edit my Wordpress files, after saving, I get this annoying ^M with every line break. I was told that this is a Windows issue, which is kind of confusing cause i am using a MAC. For editing I use PHPStorm with UTF-8 setup. Additional I don't know much or nothing about encoding. Anybody can help?

도움이 되었습니까?

해결책

For brand new files (created in IDE) you can change default line ending in Preferences | Code Style | General | Line Separator.

For existing files -- it is automatically detected for each file individually. You can change line ending at any time by changing File | Line Separators (or via right click in status bar in appropriate place -- where current line ending is displayed).

다른 팁

if you can use a Vi editor.. open your file using vi ...

vi example.java

then press esc and type :

then type beside the colon %s/ctrl+v ctrl+M/

press enter/return

then press esc and :

now type wq

It would save the edits and ^M would be gone ..,,

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top