Questions tagged [lf]

Line Feed is a special character (unicode U+000A).

Line Feed is a special character (unicode U+000A), (ASCII: '\n', 0x0A, 10 in decimal). Line feed (LF) and carriage return (CR) are closely associated to represent end of line (EOL).

68 questions
0
votes
0 answers

convert CRLF file to LF in windows batch

i am creating files in Windows, so they're automatically created as CRLF files; i need them to be LF files. The files are created by a batch script, which then use them and delete them afterward, so I need the change to be done in the batch script,…
Ablia
  • 143
  • 9
0
votes
2 answers

Delete LF from file using C#

I have to make a script in C# to delete 'LF' from a file. The structure of the file like this : line1 'CR''LF' line2 'CR''LF' line3 'LF' some_text_of_line_3 'CR''LF' I want to have this : line1 'CR' line2 'CR' line3 some_text_of_line_3 'CR' Thank…
Thomas
  • 49
  • 3
0
votes
0 answers

Multiple Line Endings in a single file

Basically I am trying to convert Line Endings of a large number of files. While I'm doing a lazyread and using regex to replace the line endings In order to find if the file already exists in desired line ending, I have put an if statement like the…
San PJ
  • 11
  • 2
0
votes
1 answer

openssl, stdin, echo, and <<<: handling trailing line feed

TWO QUESTIONS: Is there a concise way strip the trailing \n of the stdin from version when using << Is there a name for <<< that will help when searching for answers to questions like this? ('IFS' and 'three left angle brackets', etc, haven't been…
0
votes
1 answer

Failing to Create XML in powershell with LF & UTF-8

I've been trying the past few days to create a Powershell script that will create a XML file with 2 fields saying the time. Problem is the XML created is CR LF with UTF-8 BOM and what I need is LF with UTF-8. Edit - Following 'LotPings' advise,…
Radi
  • 1
  • 1
0
votes
2 answers

Where should I put .gitattributes file so that PyCharm reads it (Windows 10)?

I have a simple .gitattributes file with (only) the following in it: * text eol=lf in my user home directory on Windows 10. It seems that PyCharm ignores it when I pull origin/master git repository, namely the newly checked out files always have…
DeLorean88
  • 313
  • 1
  • 2
  • 11
0
votes
0 answers

SSIS : How to Ignore LF when CRLF delimiter

Our Flat File Manager from csv file had import error due to unexpected LF in some columns, even though with file delimiter CRLF. The csv file was transfered from other Windows system with same code page (SJIS, 932) but that file was originally…
Sachiko
  • 541
  • 1
  • 5
  • 17
0
votes
1 answer

How to save a dataframe as a .csv file with UTF-8 encoding and LF line ending in R using Rstudio?

I came across this weird situation: I need to save a dataframe to a .csv file UTF-8 and with a LF ending. I'm using the latest version of R and Rstudio on a Windows 10 machine. My first attempt was to do naively: write.csv(df, fileEncoding="UTF-8",…
mickkk
  • 1,072
  • 2
  • 11
  • 34
0
votes
2 answers

Build string with OS-specific newline characters (CRLF, LF, CR) to write it into a database table column

I want to write write a string that contains the usual new line character of R (\n) into a column of a database table. How can I convert the new line into operating system specific representation (Windows = CR/LF, Linux = LF, Mac = CR...)? I have…
R Yoda
  • 6,993
  • 2
  • 34
  • 68
0
votes
1 answer

Gradle line ending char for sourceSets

My build.gradle file contains the following: sourceSets { main { output.resourcesDir = "build/app" } } This is working well, content of src/main/resources is correctly copied into build/app folder. However, I have some resources (scripts) for…
hublo
  • 776
  • 2
  • 9
  • 26
0
votes
1 answer

Can not add line feed to string

I have an Arduino Leonardo and trying to use it as a serial to USB converter. On Serial1 I have a string ending on a number. This number I'm trying to get via USB to the PC. It works very fine but I need a '\n' at the end and I don't know how. When…
toolsmith
  • 11
  • 2
0
votes
0 answers

MS Excel changes \n with \r

I have CSV file with line ending character equal to "\n". When I edit it and hit save, I get alert "Some features in your workook might be lost if you save it as CSV". I tried with both Yes and No, and in both cases it changes line endings in file…
user3681549
0
votes
1 answer

Git: commit file with LR with msys/cygwin Git

I have a bash script under Git version control on Windows (cygwin git). I would like checkout file from repo with LF (it is bash script) on windows (and I have core.autocrlf=true). As a result, I've got CRLF file and "$'\r': command not found" error…
k84d
  • 1
  • 1
0
votes
1 answer

Replacing vbCrLf with vbLf

I have a a paragraph of text that is sent in with an Lf tag for new lines separating parts, when this is being processed the Lfs end up as CrLF. My issue is that this data is being trimmed down to 4095 characters(database defined char limit) and the…
Onboardmass
  • 23
  • 3
  • 7
0
votes
1 answer

Python regexp \n issue

This searched ok: >>> re.search(r'(.*?)\r\n(.+?)\r\n', 'aaa\r\r\nbbb\r\n').groups() ('aaa\r', 'bbb') But when I replace one of three b to \n it not searched: >>> re.search(r'(.*?)\r\n(.+?)\r\n', 'aaa\r\r\nb\nc\r\n').groups() Traceback (most recent…
Ivan Borshchov
  • 2,215
  • 3
  • 26
  • 56