Carriage return and Line feed… Are both required in C#?

System.Environment.NewLine is the constant you are looking for – http://msdn.microsoft.com/en-us/library/system.environment.newline.aspx which will provide environment specific combination that most programs on given OS will consider “next line of text”. In practice most of the text tools treat all variations that include \n as “new line” and you can just use it in your text “foo\nbar”. Especially … Read more

Are shell scripts sensitive to encoding and line endings?

Yes. Bash scripts are sensitive to line-endings, both in the script itself and in data it processes. They should have Unix-style line-endings, i.e., each line is terminated with a Line Feed character (decimal 10, hex 0A in ASCII). DOS/Windows line endings in the script With Windows or DOS-style line endings , each line is terminated … Read more

Writing a new line to file in PHP (line feed)

Replace ‘\n’ with “\n”. The escape sequence is not recognized when you use ‘. See the manual. For the question of how to write line endings, see the note here. Basically, different operating systems have different conventions for line endings. Windows uses “\r\n”, unix based operating systems use “\n”. You should stick to one convention … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)