proposal: line end characters for feed files

9 views
Skip to first unread message

Bob Heitzman

unread,
Jun 19, 2007, 12:00:40 PM6/19/07
to Google Transit Feed Spec Changes
Many MS Windows tools expect a Cr/Lf sequence for line ends on import
(Notepad is one notable tool) and the tools will write Cr/Lf sequence
on export.

It is proposed that the server side routines that import feed files
tolerate the cr/lf sequence for line ends.

It is also proposed that the server side routines tolerate a line end
sequence on the last import line.

(Both of the above may be true today - I am just going by what I am
seeing in the current sample feed files which in most cases use a LF
as line end (there are isolated cases of CR) and the last line is
missing a line end - probably the result of an export using a Unix
tool.)

The current spec states:
Field values may not contain tabs, carriage returns or new lines. If a
field contains any of these characters, we will not be able to process
that data.

It is proposed that carraige returns be tolerated (I'm not sure what a
new line is so I may be asking that they be tolerated too!:) in the
feed files.

Tom Brown

unread,
Jun 19, 2007, 4:31:40 PM6/19/07
to gtfs-c...@googlegroups.com
 
Any variation in the lineends of the example are unintentional. I think we should change the spec to say: All lines must end in CR LF (Windows line ending) or LF (Unix line ending). GTFS writers should use consistent line endings throughout a feed. GTFS readers should parse lines without consistent line ends and the last line of a file even if it does not have a correct line ending.

I'll create a new issue to have the feed validator check for invalid or inconsistent line endings.
Reply all
Reply to author
Forward
0 new messages