Line-ending signifies end of line. Depending on operating system line-endings are different.
Questions tagged [line-endings]
516 questions
0
votes
1 answer
Change QT End of Line Style of QTextStream for cross platform Text Editor application
So I am building a cross platform QT text editor. I am developing on Linux, to target for Windows. I am making it as easy as possible for the user to save the text file with whichever encoding that they wish.
I compiled the project with with M Cross…

CigEmacs
- 55
- 1
- 1
- 10
0
votes
1 answer
Python: line termination while reading and writing files
I've written a simple utility which removes certain lines from a file. It reads a file into a list of lines (Python), and writes them back as a single concatenated string, new lines preserved; some lines are dropped, some get commented in the…

Alexey Orlov
- 2,412
- 3
- 27
- 46
0
votes
0 answers
Line endings with git, insisting warning
I have just started using git with windows. Each time I add a file I get this warning
warning: LF will be replaced by CRLF in main.cpp.
The file will have its original line endings in your working directory.
and it seems like the way to surpress…

Noname
- 355
- 2
- 10
0
votes
1 answer
Find out if there are CRLF (i.e. \r\n) committed in the Git and which commits introduce them
Sometimes I find out that there are CRLF line-endings committed in Git history. The project has many teammembers, so I'd like to find which commits have been adding CRLF, so I can contact the authors (I assume they didn't select the "checkout…

sashoalm
- 75,001
- 122
- 434
- 781
0
votes
1 answer
Does .Net contain a built in Line Endings conversion which checking input format
I'm getting a string from an external native library function which uses "\n" for line separation. I simply want to write this to disk using the appropiate line ending format on the system I'm running my .Net application, which will be usually…

Florian Storck
- 509
- 8
- 22
0
votes
1 answer
PySpark read in a big customized line ending file
The file is 20 GB, the line ending char is ␀. Below are PySpark code:
text_file = sc.textFile(file_name)
counts = text_file.flatMap(lambda line: line.split("␀"))
counts.count()
The error as below:
Too many bytes before newline: 2147483648
Question:…

nkhuyu
- 840
- 3
- 9
- 23
0
votes
1 answer
Split file by context and size in bash
I have a set of large files that have to be split into 100MB parts. The problem I am running into is the fact that lines are terminated by the ^B ASCII (or \u002) character.
Thus, I need to be able to get 100MB parts (plus or minus a few bytes…

Vlad
- 23
- 1
- 6
0
votes
1 answer
Dockerfile: check if build machine is Windows
We have a Docker project that is shared by developers using Windows, Mac or Linux.
Unfortunately we can't control the way the project is cloned, so Windows developers might end up with bad line-endings when building the Docker image and the build…

Saintali
- 4,482
- 2
- 29
- 49
0
votes
1 answer
Copied a bunch of files from windows to ubuntu server and now all the files are showing modified in git with ^M
Transferred over 50k files from my windows box to my ubuntu server and now git diff is showing all my files are modified with ^M at the line endings.
I tried changing the auto.crlf to true in the command line and it doesn't work.
And no I can't…

Patoshi パトシ
- 21,707
- 5
- 29
- 47
0
votes
2 answers
0
votes
1 answer
TeamCity + Line endings, C# Multi-line verbatim strings
I have multi-line strings in the following format:
@"Text on Line 1
Text on Line 2."
When I build my tests in Visual Studio and run using VS Developer cmd, it runs fine and compares expected string vs actual.
But when running on teamcity using…

Razkar
- 539
- 5
- 26
0
votes
0 answers
Why .gitattribute not forcing line endings?
I've faced some unclear behavior of how GIT manages line endings. There are a bunch of *.sh files in my repository. Line endings are inconsistent: some have CRLF line endings while others have LF line endings. When I refreshed repository by rm…

alaptiko
- 499
- 3
- 14
0
votes
0 answers
Spyder introducing newlines in files with mixed line endings
I have some python code managed with GIT and developed in Spyder (all on windows 7, python 2.7.10, winpython). Somehow the code is broken since a few days and when opening files in Spyder it tells me, that the file has mixed line endings, which are…

Dschoni
- 3,714
- 6
- 45
- 80
0
votes
0 answers
git add warning about line endings, core.autocrlf is false
Everything I've read online tells me this should not be possible:
C:\Users\eric_\Code\range-v3>git add conanfile.py.in
warning: LF will be replaced by CRLF in conanfile.py.in.
The file will have its original line endings in your working…

Eric Niebler
- 5,927
- 2
- 29
- 43
0
votes
0 answers
How to determine text file line separator?
I have two files - created in windows and linux. The first file has CRLF line separators, the other - LS separators. Where info about line separator can be stored? Does it depend on encoding? Looks like no..
For example notepad++ has a special…

sku144
- 119
- 1
- 2
- 10