سؤال

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