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
0
votes
1 answer

error in python : unexpected EOF while parsing,how to resolve this?

I am running this code to extract to get tweets. But running this code gives me a Syntaxerror : unexpected EOF while parsing. I am new to python so any help is appreciated! Thanks in advance. from TwitterSearch import * try: tso =…
Neema9
  • 1
  • 1
0
votes
0 answers

PugiXML Preserve Whitespace, but not EOL

I'm converting html into xml, changing tag names and other stuff, but i have problems with preserving whitespaces. This is how I'm loading file: xml_parse_result check = doc.load_file(sourcePath.c_str(), (parse_default | parse_ws_pcdata),…
Horokey
  • 1
  • 1
0
votes
0 answers

Is there a way for BufferedReader to give last instance a particular character was read?

I want my BufferedReader to give me the last 'End of Line' instance, so that I can then mark() this position and reset() to this instance. I have the following code so far: do { int token = st.nextToken(); switch…
user2675041
  • 115
  • 1
  • 5
  • 15
0
votes
1 answer

EOL while scanning screen literal when using urllib.urlopen (PYTHON)

guys, so I'm learning Python and I've written this program: import urllib def read_text(): quotes = open(r"C:\moviequotes\moviequotes.txt") contents_of_file = quotes.read() print(contents_of_file) quotes.close() …
0
votes
0 answers

Crossplatform programming in Git

I am having some trouble with the already well known EOL problem and Git. I usually work with two machines: M1 (Work): Windows 7 and Netbeans + VMWare + Debian as a local server. M2 (Home): Mac OS and Netbeans + Parallels + Samba + Debian as a…
talisker
  • 53
  • 7
0
votes
3 answers

Biztalk Editor v3 output specification without eol

I have a problem with output spec, is possible to create the spec without any EOL character - flat file in one line? I use BizTalk Editor v3.00... i think is a 2001.
Nerus
  • 167
  • 1
  • 2
  • 13
0
votes
2 answers

Python 2.7.6 String Literal error with Quotations in Quotations

In the function print 'He said, "\"She\'s pretty"\' I am getting an error that says "There's an error in your program: EOL while scanning string literal" How do I fix this?
jak10101
  • 19
  • 1
  • 5
0
votes
2 answers

PHP equivalents of .hasNext() and .hasNextLine()?

What are the PHP equivalents of .hasNext() and .hasNextLine() in Java? If there is none, how do I detect EOL and EOF? Purpose: Have a file of generic length, but every line has the same format: string number number The end product derived from…
0
votes
1 answer

How to read alternating lines of text in a file to separate arrays in C++?

The assignment is to make a test grader. The first line of the file is all the answers and the next lines alternate between a students name (LAST, FIRST) and they're answers on the following line. I'm able to pass in the test key answers but when I…
0
votes
3 answers

how to tell when vim has added EOL character

How I can see in vim when a file has a newline character at the end? It seems vim always shows one, whether it's truly there or not. For example, opening a file that has a newline at the end: echo "hi" > hi # confirm that there are 3 characters,…
Magnus
  • 10,736
  • 5
  • 44
  • 57
0
votes
1 answer

recv() end of line

while ((client = accept(sock, (struct sockaddr *) &c, (socklen_t *) &clientlength)) > 0) { int h = 0; int i = 0; char el[4] = "\r\n\r\n"; while (recv(client, r , 1, 0) != 0) { if (h==4) break; if (*r == el[h]) { …
0
votes
1 answer

EOL whilst scanning string literal - Python

I'm new to Python. I'm trying to make code it so it will print out this ASCII art traffic light, here is the actual ASCII ## _[]_ [____] .----' '----. .===| .==. |===. \ |…
monkey334
  • 327
  • 2
  • 8
  • 23
0
votes
1 answer

chdir() function fails when given a path with a PHP_EOL

I have some PHP Code and I am getting an Error when I use chdir to work with Hebrew file names: function GetSubFoldersArray() { $subFoldersArr = array(); $yourStartingPath = "images"; $iterator = new RecursiveIteratorIterator( …
Alex Batt
  • 65
  • 1
  • 2
  • 8
0
votes
3 answers

sed: replacing end of line

I need to quote end of line and using this solution to replace end of line which working perfectly when file has multiple lines. Problem arises when I try to use this method with files that have no \n or have single line ending with \n. In this case…
loentar
  • 5,111
  • 1
  • 24
  • 25
0
votes
1 answer

Why does OAuth2 authentication work on home machine but not on a server?

I'm struggling to get OAuth2 authorisation to work on a script I'm working on when I run it on an EC2 Linux server instance (running Ubuntu 13.04). The relevant snippet is: with open('creds.txt') as f: creds = {} for line in f: …
Jamie Bull
  • 12,889
  • 15
  • 77
  • 116