[OSM-dev] Line endings on Windows for OSM files

Jochen Topf jochen at remote.org
Tue Aug 25 12:00:29 UTC 2015


Hi!

I am working on the libosmium C++ library. It can read and write all sorts of
OSM files. And it works on Windows. No I have been asking myself whether I am
using the "right" line endings on Windows. Unix normally has LF, Windows has
CRLF. So does that mean I should write OSM XML files with CRLF on Windows.
Does Osmosis do it that way? Other programs? What about when I download a
planet file or call the OSM API? Does the browser magically convert the LFs
in those files into CRLFs? What about when the file is gzipped?

Ideally I want to do whats least surprising to Windows users. Whatever is
most convenient for them, works with the most software they have.

Jochen
-- 
Jochen Topf  jochen at remote.org  http://www.jochentopf.com/  +49-351-31778688



More information about the dev mailing list