Questions tagged [eol]

EOL is short for "end of line". In text files each line is terminated with characters such as linefeed or carriage return or a combination thereof.

EOL stands for "end of line" and refers to the various character or combination of characters that signify the end of each line of a text-based file.

For historical reasons there are various common EOLs:

  • linefeed or newline, ASCII 0x0A: common on systems with Unix heritage including Mac OS X
  • carriage return + linefeed, ASCII 0x0D 0x0A: common on systems with Microsoft DOS and Windows heritage and in text-based internet protocols
  • carriage return, ASCII 0x0D: used on Apple Macintosh up to System 7

These differences can present problems when using files and source code on multiple operating systems. Issues may be encountered with text editors, compilers, and revision controls systems.

See also

380 questions
11
votes
0 answers

Why different EOL in html causes javascript in Safari to behave differently?

I have two identical html files (except for EOL character - one is LF and the other is CRLF), which I use to load 2 audio files using XMLHttpRequest. I don't use any web server (because the purpose is to load it in ipad and run it without any web…
10
votes
6 answers

Can git-svn be made to handle CRLF like native subversion clients?

I have a subversion repository hosted on Linux but only ever accessed via windows clients as it's for the source of a large Windows application. It would be awesome if I could work on this repository using git-svn (provided by msysgit). I'm having a…
toholio
  • 2,888
  • 2
  • 22
  • 21
10
votes
3 answers

How to adjust SVN settings to convert line endlings on Windows?

I need to use SVN on Windows and would like to set it up such that line endings are always checked out in Windows style and always committed in Unix style, regardless which repository is used. Is this possible or will I have to write a…
9
votes
3 answers

Resharper reformat is changing line endings

Is there a setting to change it so ReSharper leaves my line endings alone? Nothing is jumping out at me. Explanation of how I verified it below... It looks like when I use ReSharper and do a complete code cleanup, it will change my line endings to…
CubanX
  • 5,176
  • 2
  • 29
  • 44
9
votes
1 answer

How to sscanf to make sure the buffer is exactly what I wanted?

I would like to sscanf a line and make sure that that there is nothing more then what I wanted in it. The code looks like this: void parse_init_command(char *buffer, command *new_command) { if (sscanf(buffer, "%s %d %d %d %d %d %d…
madasionka
  • 812
  • 2
  • 10
  • 29
9
votes
1 answer

How do I parse end-of-line with boost::spirit::qi?

Shouldn't a simple eol do the trick? #include #include #include #include using boost::spirit::ascii::space; using boost::spirit::lit; using boost::spirit::qi::eol; using…
Greg Bacon
  • 134,834
  • 32
  • 188
  • 245
9
votes
1 answer

How do I avoid git-svn and svn CRLF problems such as this one?

I am using git svn and today I ran into some trouble. I did an git svn clone and worked on my project for a while. After a few days, I've pushed my work to the svn remote (git svn dcommit). Then I've tried to checkout the project with TortoiseSVN…
dr Hannibal Lecter
  • 6,665
  • 4
  • 33
  • 42
8
votes
6 answers

SVN Line ending Style

When i try to commit the file in SVN its showing error as "Commit failed".Details follow....commit svn: Inconsistent line ending style.
Suman
8
votes
3 answers

Is there a way to set EOL to LF in Visual Studio for whole solution or project?

In Visual Studio you can set file's EOL to CRLF, LF, or CR, however you can do it only to a single file. I'm looking for a way that will make sure that every new file made in my solution will automatically use LF. Any ideas? Thanks in advance!
Wispy
  • 141
  • 1
  • 7
8
votes
3 answers

Changing file EOL with vscode extension API

Can I silently change end of line sequence in VSCode? Something like this: vscode.commands.executeCommand("workbench.action.editor.changeEOL", "LF");
Rus
  • 718
  • 2
  • 6
  • 19
8
votes
3 answers

constant like PHP_EOL for tabulation php

Please help, how can i find the constant like PHP_EOL for tabulation My code wrote file which has a lot of generated tabulations and new lines new lines wrote correctly, but i have a lot of "\t\t" see example: common.app \t/loader \t/growl…
Andrzej Moroz
  • 548
  • 1
  • 7
  • 19
8
votes
2 answers

C++ get the size (in bytes) of EOL

I am reading an ASCII text file. It is defined by the size of each field, in bytes. E.g. Each row consists of a 10 bytes for some string, 8 bytes for a floating point value, 5 bytes for an integer and so on. My problem is reading the newline…
jramm
  • 6,415
  • 4
  • 34
  • 73
7
votes
3 answers

CSS end of line character

Okay, what I want is this: When the

tag ends with

, I want to add a character at the end of the line. For example

Something and more!

Should look like Something and more!_ Where the '_' (underscore) is the added character. Is this…
Highmastdon
  • 6,960
  • 7
  • 40
  • 68
7
votes
2 answers

Regex matching end of a line $ not working in Bash Script

I'm trying to do a simple regex statement in a bash script that will match and substitute the end of a word. Below is what I'm trying to do. wordh > word:’ Below is the code I'm using. #!/bin/bash STAT=${STAT/h$/:’} I'm not familiar with bash…
user2743
  • 1,423
  • 3
  • 22
  • 34
7
votes
6 answers

JavaScript to split string by end of line character and read each line

I have a need to loop through a large string with several eol characters and read each of these lines looking for characters. I could've done the following but I feel that its not very efficient as there could be more than 5000 characters in this…
nixgadget
  • 6,983
  • 16
  • 70
  • 103