Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MalformedCSVException when parsing a line just serialized (with the same format) #29

Open
pazqo opened this issue Nov 21, 2014 · 2 comments

Comments

@pazqo
Copy link

pazqo commented Nov 21, 2014

Minimal Example of what's not working (using version 1.1.1). I write on a StringWriter, but the result is the same if I write on a file.
Since I use the very same format for writing and reading, there should not be problems in reading what I just wrote.

import com.github.tototoshi.csv._
import java.io.StringWriter

val wrong_text = "hello\\Tototoshi"

implicit val format = new TSVFormat {}

val w = new StringWriter

val csvwriter = CSVWriter.open(w)(format)
val parser = new CSVParser(format)

csvwriter.writeRow(List(wrong_text))

val line = w.toString

parser.parseLine(line)
@reemplazable
Copy link

Similar problem here when trying to parse:
BMW"1"E874pdel.(2004>)Mecanismo (PIMAX): PX05705L

@AlexeyRaga
Copy link

Is this project alive?
I've hit the same issue: when encoding then the escape character itself is not getting escaped UNLESS it is the same character as quoteChar.
But when decoding it is always expected to be encoded.

Looks like a bug indeed, @tototoshi what you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants