RMI / RMI/resources

Line ending conversion: Common problems and solutions

Open
#144 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

git platform-hell
Dominant language
No language data
Stars
17
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Different platforms represent the end of a line in a different way. Mac and Linux do it one way, and Windows another way.

In any one team people may use multiple platforms. What's the best setup for your team? You may need to read and try. This is what I use:

$ git config --global core.autocrlf
$ input
Git

https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration

image

RStudio

image

Excel

In one case Excel inserted Windows-like line ending in a Mac.

The issue with excel. For some reason it was defaulting to the standard ‘.csv’ and not to ‘UTF-8 .csv’

-- @jdhoffa

My solution to this problem was to read then re-write the data (I used readr::read_csv() and readr::write_csv() in R).

Here is the file before (left) and after (right) my fix.
image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No target file, test, or documentation entry point is named. Start by reviewing the issue's Git, RStudio, and Excel examples alongside the linked Git configuration guide, then establish the intended scope and document verified line-ending guidance and solutions.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, r
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.