dralagen/csv2xml — pull request #4 by skreutzer (2014-12-31 15:21:06+00:00)
Title: Recognize a field beginning with a quotation mark immediately followed by a line feed as a complex field.

If a field began with 0x22 ("), 0x0A (LF), then the logic to identify a complex field with delimiter character or multiline in split() wasn't triggered, so a quote field was assumed. There, the call of String.substring(1, 0) caused a StringIndexOutOfBoundsException as beginIndex needs to be <= endIndex. BufferedReader changed to LineNumberReader for more detailed error reporting. LineNumberReader is derived from BufferedReader and provides a getLineNumber() method. If split() was called recursively in order to do line extension for multiline fields, a space was added which wasn't in the source CSV data, so I changed it to \n and leave it up to the XML to deal with it (it's the job of interpreters to decide what to do with it. This way, there's at least a chance that whitespace can be preserved, if necessary).