Modify

Opened 5 years ago

Closed 4 years ago

#1624 closed enhancement (fixed)

[PATCH] use consistent line endings in GpxWriter

Reported by: h-a-l-9000@… Owned by: framm
Priority: trivial Component: Core
Version: Keywords:
Cc:

Description

When opening a gpx file written by GpxWriter with i.e. Windows Notepad the formatting is broken. The small patch makes them consistent.

Attachments (1)

gpxwriter_lineending.diff (653 bytes) - added by h-a-l-9000@… 5 years ago.

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by h-a-l-9000@…

comment:1 Changed 5 years ago by Henry Loenwind

  • Priority changed from minor to trivial
  • Summary changed from Patch: use consistent line endings in GpxWriter to [PATCH] use consistent line endings in GpxWriter
  • Type changed from defect to enhancement

comment:2 follow-up: Changed 5 years ago by anonymous

this will save \r\n on windows and \n on Linux (different on MacOS)
It's the desired behaviour?
Should always write \n or write platform specific line-ending character?

comment:3 in reply to: ↑ 2 Changed 5 years ago by h-a-l-9000@…

Replying to anonymous:

this will save \r\n on windows and \n on Linux (different on MacOS)
It's the desired behaviour?
Should always write \n or write platform specific line-ending character?

Currently there are both println(...) and print("\n") used for writing the file. The patch is supposed to unify it.

The parsers shouldn't bother either way, it's just a cosmetic error in the rare case that a human opens such a file.

comment:4 Changed 4 years ago by stoecker

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r1164.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.