[GRASS5] [bug #2641] (grass) [5.7] v.in.ascii support for Mac OS9 and DOS newlines

Request Tracker grass-bugs at intevation.de
Thu Sep 30 07:00:14 EDT 2004

this bug's URL: http://intevation.de/rt/webrt?serial_num=2641

Subject: [5.7] v.in.ascii support for Mac OS9 and DOS newlines

Platform: GNU/Linux/i386
grass obtained from: Mirror of Trento site
grass binary for platform: Compiled from Sources
GRASS Version: 5.7 cvs sept 2004

It would be nice if 5.7's v.in.ascii input from stdin supported Mac OS9 and DOS newlines as well as UNIX ones. Just tried using it with a tab delimited text file created in Win2k Excel on a OSX installation of GRASS; MS IE on OSX saved the attachment as a Mac OS9 text file (argh), Safari saved it in original DOS format... the conversion is not exactly something I could explain to the student who only knew about Macs...

complication I had implementing this in 5.3's s.in.ascii: fgetl() doesn't stop on \r's (Mac OS/9); I think v.in.ascii figures out input line length and uses fgets(,maxlength), so this might not be an issue here.

For DOS files you need to strip the \r from the end of the line if it exists otherwise it shows up in the last (text) field.


-------------------------------------------- Managed by Request Tracker

More information about the grass-dev mailing list