Questions tagged [end-of-line]

The end of a physical line

The end of a line is usually signaled by the '\n', '\r' or '\r\n' characters.

The line that has ended is the physical line, as is observed by the line-break in the visual text. This is different from the end of a logical line in programming languages, which is signaled by the ; character in many languages including the family of languages, , etc

134 questions
0
votes
1 answer

How do I write code to determine whether the EOL character in a CSV file is `\r` or `\n` without looking at the file contents?

I'm using Python in Jupyter Notebooks to work with a CSV file. I'm writing the same code in two different versions of Jupyter Notebook--one that's running directly on my computer and another that's running off a kind of emulator within an online…
Data2Dollars
  • 731
  • 2
  • 8
  • 21
0
votes
1 answer

Trailing end-of-lines in C++ with Tortoise SVN

I'm new to a team that uses SVN for source control. I'm used to Git myself, so I'm really at a loss with all of SVN's pre-commit/post-checkout filters for tracked files. I've commited some C++ source code with standard-compliant trailing…
André Caron
  • 44,541
  • 12
  • 67
  • 125
0
votes
1 answer

sqlite3 is not using end-of-line character when importing data

I have a tab-delimited file which I'm attempting to load into a table. The table has already been created and structured appropriately, the challenge is that SQLite3 is combining the last value on one row with the first value on the next row. So…
0
votes
1 answer

forcing end of line character in google sheets

Is there a way to force cells in google sheet to end with 'enter'? If I'm updating a sheet, I can input a string in cell A1 ... then use the right arrow to move to the B1. Sometimes this is preferable because entering a string and then pressing…
testing123
  • 761
  • 6
  • 13
  • 37
0
votes
1 answer

Is that necessary for checking "inconsistency of line endings" VS

I am using VS 2017 on only Windows. However, it frequently pops up the warning “inconsistent line endings”. I found a solution to turn it off from this link. But then I have some questions related to this issue: I use only Windows, why does it have…
T D Nguyen
  • 7,054
  • 4
  • 51
  • 71
0
votes
1 answer

Add unix end of line

Let's say I want to create a line that I would put in a unix file. if it was windows, in the php program, I would write : $line .= '\r\n'; What would I write for unix to have unix end of line and go to the next line? How can I make it work for any…
mlwacosmos
  • 4,391
  • 16
  • 66
  • 114
0
votes
2 answers

JEditorPane Is Last Line

Using a JEditorPane, is there any way to tell if the caret is currently on the last line? I cannot find anything in the API or more importantly JTextComponent of which JEditorPane is derived. I need to find this out when the user uses the down arrow…
user372743
0
votes
1 answer

Adding string with new line characters in a file to upload to an SQL UTF8 database

I've discovered the \copy command to upload CSV/TSV files to a table. It's a very convenient method because I have a large amount of data to load at the same time. My problem is that I have some text to load and some of them contain \n characters.…
Thibaut Guirimand
  • 851
  • 10
  • 33
0
votes
1 answer

Finding and keeping end of line (^M)

I'm trying to scan a file that has the DOS ^M as end-of-line using something like: Scanner file = new Scanner(new File(saveToFilePath)).useDelimiter("(?=\^M)") In other words, I want to read the text line by line but also keep the ^M that marks the…
Rick
  • 1
  • 2
0
votes
1 answer

Why does StringReader read '\uffff'?

I am writing a language of my own called SPL. It has an Input command which reads input from the ISplRuntime.Input property (it is a TextReader). All other commands run on this interface because this way I can write different apps with just one…
Sweeper
  • 213,210
  • 22
  • 193
  • 313
0
votes
2 answers

Unable to remove end of line characters in PHP

I am trying to remove the curse words from the comment entered by the user.The curse words are read from a text file, but the problem is that the words I read do not match the word it is meant to be. The apparent problem is the EOL…
Shivam
  • 383
  • 1
  • 3
  • 8
0
votes
0 answers

java - Detect end of line with Scanner

I would really like to make a Method with a parameter of type Scanner which checks if the end of a line is reached. I already tried the following but is doesn't work at all. As parameter for in.hasNext() I already tried \r\n and \n as show below.…
pabk
  • 3
  • 3
0
votes
2 answers

How to determinate who is in the end of a line

Im trying to build a app that will give the estimated position of a line. here in my college we have a Student restaurant, the line gets huge some days, something like 1h or 2h waiting. I have write a code that will get the position by gps of a…
0
votes
1 answer

Python get index of empty live

This is how the response looks like HTTP/1.1 301 Moved Permanently Location: http://www.google.com/ Content-Type: text/html; charset=UTF-8 Date: Fri, 11 Sep 2015 19:18:15 GMT Expires: Sun, 11 Oct 2015 19:18:15 GMT Cache-Control: public,…
0
votes
0 answers

End of line evaluation within PHP/HTML

I use a form which purpose is to generate a customized .csv file. Among other things, the user can specify the end of line character. To do so, he simply enters it in a text area. I have a problem with the backslashed characters, and in particular…
Fafanellu
  • 424
  • 4
  • 20
1 2 3
8
9