On 1 May 2013 08:53, Benedikt Ritter <brit...@apache.org> wrote: > Hi, > > I have tried to solve CSV-58 - Escape handling needs rethinking [1] a few > times over the past weeks now. But I can not see a way to get this working. > There are two problems with our current implementation: > > 1. a sequence of " test \a test" will be parsed to "test a test", although > there is no reason to escape 'a'. The expected behavior is to let the > sequence \a unchanged. >
An alternative would be to throw an Exception. > 2. If the escape char is different from backslash (for example '!'), a > sequence of "test !r test" will be parsed to "test CR test" > > Is that how other CSV parsers behave? i.e. do they always use \ for escaping EOL? > I have tried different approaches to handle this issue but there are always > corner cases that I'm unable to cover. I'm getting the feeling that I'm > just to dump to solve this, so any comments or suggestions would be really > appreciated! > > Perhaps it would help to commit the unit tests you are working to solve. The tests can be disabled. Or perhaps better use a class whose name is not one of the ones picked up by Surefire. This allows the test to be run independently by Eclipse (and Maven) but won't mess with CI builds. Benedikt > [1] https://issues.apache.org/jira/browse/CSV-58 > > -- > http://people.apache.org/~britter/ > http://www.systemoutprintln.de/ > http://twitter.com/BenediktRitter > http://github.com/britter >