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

François Battail francois.battail at sipibox.fr
Tue Aug 25 13:08:28 UTC 2015


Le 25/08/2015 14:00, Jochen Topf a écrit :

> 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.

Well, most programs just don't care about CR, a parser will likely be 
written like that:

switch (character)
{
   case '\n' :
     line ++ ;
     break ;

   case '\r':
     break ;

   ...
}

By the way XML files are not supposed to be edited by humans (well 
sometimes) but people doing that are supposed to use a decent text editor!

So I believe it's not an issue at all, just keep to use Unix text format 
standard, it will be fine.

Best regards



More information about the dev mailing list