[vtk-developers] vtkDelimitedTextReader should discard whitespace between the end of a string in the delimiter

Scott Fowler s.fowler at tecplot.com
Wed Nov 23 18:35:29 EST 2011


Brian,

You committed a fix to vtkDelimitedTextReader on 5/31/2011 (see below).  There's still a problem with trailing whitespace.  Whitespace between the end of the string delimiter and the next field delimiter is not discarded.

Currently the line:
'1,  "word"  ,2'
is parsing to:
"1";"word  ";"2" <-- trailing whitespace around "word" is unexpected.
I would expect:
"1";"word";"2"  <-- no extraneous whitespace around "word".  This is what I want.

Is there any chance you'd be willing to make this change?  I'd make this change myself, but it's not clear to me what impact this may have on clients of the object.  Note that I've recently submitted the following enhancements to vtkDelimitedTextReader: http://review.source.kitware.com/3361.

Thanks!
Scott


===========================================
commit 7b5c9ae55717d3485ec7cc7f3e5380221c8bc1d2
Author: Brian Helba <brian.helba at kitware.com>
Date:   Tue May 31 15:32:08 2011 -0400

    BUG: String parsing in vtkDelimitedTextReader

    When using string delimiters, any content (usually whitespace)
    between the start of a field and the start of a string delimiter
    should be discarded.

    Previously, the line:
      '1, "word",2'
    was parsing to:
      "1"; " word"; "2"
    it will now parse to:
      "1"; "word"; "2"

    Change-Id: I4542bbe8de9466bbdda0ac37214b85b99bf68724
=============================================

Scott Fowler
Software Development Engineer
Phone: 425.460.8265
Email: s.fowler at tecplot.com<mailto:s.fowler at tecplot.com>

Tecplot Inc. | Master the View
3535 Factoria Blvd. SE, Ste. 550
Bellevue, WA  USA  98006
Fax: 425.653.9200
Web: www.tecplot.com<http://www.tecplot.com/>


________________________________
This e-mail and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed. If you are NOT the intended recipient or the person responsible for delivering the e-mail to the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing or copying this e-mail is strictly prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20111123/9ccf1230/attachment.html>


More information about the vtk-developers mailing list