line-endings

Can't get Git to correctly handle CRLF problems with Eclipse launch configs (XML files)

浪尽此生 提交于 2020-01-01 05:16:50
问题 We have a mixed team with some people using Windows and others using Linux. We have configured the IDE (Eclipse) to use LF as line ending for source files which works well. But we also share launch configs. These are XML files and Eclipse ignores the project settings for them. Instead, it always uses the platform's line ending when writing the file. To solve this, we have these lines in .gitattributes : **/* eol=lf **/*.launch text My understanding of this configuration is "when Git does a

TMemo cannot handle Unix text (LF as line ending) correctly

左心房为你撑大大i 提交于 2019-12-30 11:56:06
问题 TMemo cannot handle Unix enters (LF) correctly. Two lines separated with a LF are shown and treated as one line. I want to handle all possible text formating (Mac, Win, Unix). Obviously I could check the text and replace the LF with CRLF every time I: load text form file paste text use the Add() function use the Insert() function use the Appen() function change the content via Text property But this won't be an elegant solution. Lazarus solved this problem with the Lines.TextLineBreakStyle

On git line-endings again

*爱你&永不变心* 提交于 2019-12-30 10:41:27
问题 All of our developers work on windows machines and build is done on Linux. In order to conform the true way we decided to normalize line endings and follow scenario described on GitHub. Later it appeared that from time to time when switching from one branch to another, some files are marked as changed while no content changes are detected. Then I came across with GitBook documentation on line endings and its normalization. So I wonder what is the difference between these two approaches? : git

On git line-endings again

僤鯓⒐⒋嵵緔 提交于 2019-12-30 10:41:23
问题 All of our developers work on windows machines and build is done on Linux. In order to conform the true way we decided to normalize line endings and follow scenario described on GitHub. Later it appeared that from time to time when switching from one branch to another, some files are marked as changed while no content changes are detected. Then I came across with GitBook documentation on line endings and its normalization. So I wonder what is the difference between these two approaches? : git

git show modify files but i don't change anything git reset did not work

痴心易碎 提交于 2019-12-30 08:33:18
问题 I clone repository switch to my branch and when i print git status i see modify files, i try to do git reset --hard but there was no effect :(( git status On branch release Changes not staged for commit: modified: htdocs/fonts/OfficinaSansBoldC.eot modified: htdocs/fonts/OfficinaSansBoldC.svg modified: htdocs/fonts/OfficinaSansBoldC.ttf modified: htdocs/fonts/OfficinaSansBoldC.woff modified: htdocs/fonts/OfficinaSansC-Book.eot modified: htdocs/fonts/OfficinaSansC-Book.svg modified: htdocs

git show modify files but i don't change anything git reset did not work

倾然丶 夕夏残阳落幕 提交于 2019-12-30 08:33:11
问题 I clone repository switch to my branch and when i print git status i see modify files, i try to do git reset --hard but there was no effect :(( git status On branch release Changes not staged for commit: modified: htdocs/fonts/OfficinaSansBoldC.eot modified: htdocs/fonts/OfficinaSansBoldC.svg modified: htdocs/fonts/OfficinaSansBoldC.ttf modified: htdocs/fonts/OfficinaSansBoldC.woff modified: htdocs/fonts/OfficinaSansC-Book.eot modified: htdocs/fonts/OfficinaSansC-Book.svg modified: htdocs

Python help reading csv file failing due to line-endings

一笑奈何 提交于 2019-12-30 08:26:52
问题 I'm trying to create this script that will check the computer host name then search a master list for the value to return a corresponding value in the csv file. Then open another file and do a find an replace. I know this should be easy but haven't done so much in python before. Here is what I have so far... masterlist.txt (tab delimited) Name UID Bob-Smith.local bobs Carmen-Jackson.local carmenj David-Kathman.local davidk Jenn-Roberts.local jennr Here is the script that I have created thus

What's the difference between \n and \r\n?

给你一囗甜甜゛ 提交于 2019-12-29 04:33:49
问题 They both mean "new line" but when is one used over the other? 回答1: \r\n is a Windows Style \n is a POSIX Style \r is a old pre-OS X Macs Style, Modern Mac's using POSIX Style. \r is a carrige return and \n is a line feed, in old computers where it not have monitor, have only printer to get out programs result to user, if you want get printing from staring of new line from left, you must get \n for Line Feed , and \r for get Carriage return to the most left position, this is from old

Automatic EOL conversion in Eclipse

拜拜、爱过 提交于 2019-12-29 03:50:12
问题 Need to keep EOL format consistent in all resources under Eclipse workspace. I know about Eclipse preference that sets new line style for newly created files, but I would like to have automatic conversion for already existing files. Is there some settings/plugins? I want just setup once and be sure that all line endings are in the same format. 回答1: In addition to the Window > Preferences > General > Workspace setting for new files that you already know about, there is a File > Convert Line

Win32/C: Convert line endings to DOS/Windows format

心不动则不痛 提交于 2019-12-25 04:52:07
问题 I've the following C function in a Windows API project that reads a file and based on the line endings (UNIX, MAC, DOS) it replaces the line endings with the right line-endings for Windows ( \r\n ): // Standard C header needed for string functions #include <string.h> // Defines for line-ending conversion function #define LESTATUS INT #define LE_NO_CHANGES_NEEDED (0) #define LE_CHANGES_SUCCEEDED (1) #define LE_CHANGES_FAILED (-1) /// <summary> /// If the line endings in a block of data loaded