Questions tagged [linefeed]

Linefeed, also known as LF, is a character that controls the switching to the next line.

Linefeed, also known as LF, is a character that controls the switching to the next line.

303 questions
2
votes
3 answers

linefeed character reading in java

I am wondering that when I open a file in notepad. I see a continuous line without any carriage return/line feed. I made a java program to read the file. When I split the data from file by using \n or System.getProperty("line.separator");. I see…
Ravi.Kumar
  • 761
  • 2
  • 12
  • 34
1
vote
0 answers

How do I maintain carriage return/line-feed values (\r\n) in the text of a JSON value?

I am new to JSON and I have been assigned a project where I need to consume it from a third-party web service. I decided to use Json.NET because it looks to be pretty complete and it seems to just figure out a lot of stuff. There is a lot of text…
user1106421
  • 39
  • 1
  • 3
1
vote
3 answers

Why this simple program leads to different carriage return/line feed file when executed in Java and AIX?

If I run this simple program on Windows 7 and then on AIX (Unix system) and compare the two generated files using a tool such as Winmerge or Compare It, it tells me that the Carriage Return and Line Feed are different but the content identical.…
Alfredo Osorio
  • 11,297
  • 12
  • 56
  • 84
1
vote
1 answer

Docker - Files Contain Bad Line Terminators

I setup a development environment using Docker on Windows 10. My Dockerfile and docker-compose.yml file uses php:8.2.2-apache, mysql:8.0.32, composer:2.5.3, and phpMyAdmin:5.2.1. I will admit that getting Docker up and running to basically mimic my…
David
  • 5,877
  • 3
  • 23
  • 40
1
vote
1 answer

Newline character in HTML TextArea

With reference to the answers available under following question - What character represents a new line in a text area The newline character in a textarea should be CRLF though entering data in a textarea with newline generates only \n as can be…
SoftEngi
  • 407
  • 4
  • 14
1
vote
1 answer

How can I apply linefeed in XSL-FO?

After some tries I could not figure it yet, how / where should be write in a XML file:
Mario P C
  • 33
  • 4
1
vote
2 answers

Replacing \n while keeping \r\n intact

I have a huge CSV file (196244 line) where it has \n in place other than new lines, I want to remove those \n but keep \r\n intact. I've tried line.replace but seems like it is not recognizing \r\n so next I tried regex with open(filetoread, "r") as…
Lisa
  • 3,121
  • 15
  • 53
  • 85
1
vote
3 answers

String.Split() using VbCrLf doesn't work but replacing VbCr with "" first then splitting on VbLf does work. Why?

I have an embedded text file as a Resource. The content is: Apple Pear Orange I am trying to pull this into a List(Of String) but the Carriage Return and Line Feed characters are messing it up. For example I try this: Dim myNames As List(Of String)…
ADY
  • 101
  • 1
  • 9
1
vote
1 answer

How do remove unwanted linefeed charachter from file-download in Laravel Nova?

In a Laravel Nova application i've got a strange issue: Whenever i try to download a file i have a linefeed char on the first line (0A, an empty line). This corrupts images, zip-files and so on. But what is causing this? I've tried/checked: Check…
Peer
  • 133
  • 10
1
vote
2 answers

How are
 whitespace and line return "saved"?

If you want to toy with white-spaces, tabs, linefeed and carriage-return, how do you "select them" in javascript? x = $('pre').html().replace(/(\r\n|\n|\r)/gm, "#"); edit : ^Does not work for linefeed and carriage-return. Now, tabs are /(\t)/…
Kraz
  • 6,910
  • 6
  • 42
  • 70
1
vote
3 answers

Is the backslash n `\n` really Line Feed, but is treated as a Newline?

For all the years using C, Ruby, Perl, Java, and PHP, or many other languages, I just took \n to mean newline. So turns out it is only "Line Feed" but is treated as "Newline"? It looks like the following are some facts, some of them from the…
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
1
vote
1 answer

Fix regex expression used to replace all \n and \r inside quotes

This might be hard to explain, I will do my best. I am currently working on a csv transform stream parser in nodejs, but I am struggling in replacing all \n's and \r's inside quotes (") that wrap a value. At the moment I have the following…
TiagoM
  • 3,458
  • 4
  • 42
  • 83
1
vote
1 answer

Line feed leaving extra space at end of line in XQuery

I have an application where I create a .csv file and then create a .xlsx file from the .csv file. The problem I am having now is that the end of rows in the .csv have a trailing space. My database is in MarkLogic and I am using a custom REST…
nobleb
  • 119
  • 1
  • 7
1
vote
1 answer

Git CRLF and LF line ending on windows/linux

I am working on a project which uses both CRLF and LF line endings. I am working on windows. I created a patch that converts a file from using CRLF line endings to LF line endings. I then formatted the patch with git format-patch. When I open this…
J.Doe
  • 13
  • 3
1
vote
1 answer

Why does an email subject contain linefeed or carriage return characters?

I'm making a code to check a mailbox, and forward unseen mails to another user. But sometimes it fails with an error: ValueError: Header values may not contain linefeed or carriage return characters I checked the raw fetched data and found out…
yoon
  • 1,177
  • 2
  • 15
  • 28