I searched about it and found out that if i do it on windows, it generates in a different way than generating on linux or mac. But how can i always generate CRLF independent of platform? Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. How to correctly write CRLF for maximum portability? Ask Question. Asked 7 years, 4 months ago. Active 5 years, 7 months ago.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up. Connect and share knowledge within a single location that is structured and easy to search. In Linux, your keyboard will send carriage return if you type Ctrl-M , linefeed when you type Ctrl-J , and backspace when you type Ctrl-H. Can't say with Windows, since you can be typing into so many different kinds of text-input controls, including a console window.
Other programs have different quoting mechanism, e. Edit: To insert another control character, look in this table in the first column. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Feedback will be sent to Microsoft: By pressing the submit button, your feedback will be used to improve Microsoft products and services.
Privacy policy. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Are you talking about an interactive editor or are you Add a comment. Active Oldest Votes. Improve this answer.
PSkocik PSkocik This can easily be done with vim. Insert a line feed character Return. Exit insert mode Esc. Doorknob Doorknob 2, 1 1 gold badge 14 14 silver badges 17 17 bronze badges.
Here's the answer for what you thought you wanted: If you really want to enter them explicitly, you need to know two things: The control codes for CR and LF, and how your editor or whatever lets you enter literal control codes.
0コメント