Feature request #1022

delimited text layer plugin: robustness

Added by hamish - over 14 years ago. Updated about 12 years ago.

Assignee:Magnus Homann
Category:C++ Plugins
Pull Request or Patch supplied: Resolution:fixed
Easy fix?:No Copied to github as #:11082



It seems MS Office for OSX lives in the past: When you save a .csv spreadsheet it saves it using Mac OS9 newlines, i.e. \
not \

Using the QGIS 0.9.2rc1 Mac binaries the delimited text layer plugin fails to parse these files correctly, it seems to get the top line column names ok, but then considers all other data lines as more top line column names.

Using nedit under X11 (I hear BBedit and a tiny drag-n-drop app called ConvertNewlines* can do it too), we resaved the file in UNIX/OSX newline format (\
) and then it worked fine.

[*] http://lionel.kr.fh-niederrhein.de/~dalitz/data/software/macosx/#tools

It sure would be nice if the delimited text layer plugin could be modified to handle that case. It is a strange and magical thing to try and explain newlines to a Mac using biologist, and who knows when MS will get with the program.

Radim wrote a fgets() replacement for GRASS which will handle all UNIX, Mac OS9, and DOS newline styles, G_getl2():


Associated revisions

Revision cdfff70b
Added by Jürgen Fischer about 12 years ago

fix #1022

git-svn-id: http://svn.osgeo.org/qgis/trunk/[email protected] c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision 4afb7293
Added by Jürgen Fischer about 12 years ago

fix #1022

git-svn-id: http://svn.osgeo.org/qgis/[email protected] c8812cc2-4d05-0410-92ff-de0c093fc19c


#1 Updated by Magnus Homann about 14 years ago

  • Status changed from Open to In Progress

Is the newline just '\
', not '\
' ?

Trying to think of the downsiode with this approach...

#2 Updated by hamish - about 14 years ago

Replying to [comment:2 homann]:

Is the newline just '\

', not '\
' ?

Yes, the MacOS9 newline is just '\


#3 Updated by Jürgen Fischer about 12 years ago

  • Resolution set to fixed
  • Status changed from In Progress to Closed

fixed in 4afb7293 (SVN r14449)

#4 Updated by Magnus Homann about 12 years ago

I have recollections of that the fix was not as simple as I first thought. Have you tested it with umlauts and utf-8?

Maybe it was me being lazy... :-)

Also available in: Atom PDF