You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by bu...@apache.org on 2002/03/12 23:08:26 UTC
DO NOT REPLY [Bug 7064] New: -
CSVParser.java doesn't handle empty fields
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7064>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7064
CSVParser.java doesn't handle empty fields
Summary: CSVParser.java doesn't handle empty fields
Product: Turbine
Version: 2.1 final
Platform: PC
OS/Version: Linux
Status: NEW
Severity: Major
Priority: Other
Component: TDK
AssignedTo: turbine-dev@jakarta.apache.org
ReportedBy: siyer1@yahoo.com
If a comma separated file has empty fields - ie those
with no value between the commas such as ,, the parser
reads all of the commas as white space and gets the next
non-empty field as the value of the token.
This bug is caused by StreamTokenizer's treatment of whitespace.
Various suggestions for fixing this:
1) Rewrite without using StreamTokenizer
2) Do not call the whitespaceChars function of StreamTokenizer, and
instead of using StreamTokenizer's nextToken() function, write
a nextToken function that uses the StreamTokenizer's nextToken function
while handling ",," appropriately.
3) Create a new Reader that replaces all ,, with ,"",
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>