Sorry Peter this must be an issue on the build on your project. Because 5.12.0 does use commons-lang3 3.18.0 as you can see from https://central.sonatype.com/artifact/com.opencsv/opencsv/dependencies. If you use maven to build your projects (and I apologize I do not know enough about gradles to know the equivalent off hand) run the following on your project: mvn dependency:tree and from what you are telling me it should show 3.17 instead of 3.18. This is because another dependency pulled in 3.17.0...
Hello Peter What version opencsv are you using? The latest release version 5.12.0 uses 3.18.0 https://central.sonatype.com/artifact/com.opencsv/opencsv/dependencies Please let me know if there are any issues with that version of commons-lang3. If so the current snapshot version uses 3.20.0 but have not released it yet because all it has is dependency updates.
It won't be that difficult. For simple apps it can be a direct replacement. There are a couple of examples at https://opencsv.sourceforge.net/#configuration or you can clone the repo and look at the unit tests. But basically replace your CSVReader constructor with CSVReader reader = new CSVReaderBuilder(new FileReader("yourfile.csv")) .withCSVParser(new CSVParserBuilder() .build()) .build(); and the CSVWriter constructor call with ICSVWriter csvWriter = new CSVWriterBuilder(new FileWriter("yourfile.csv"))...
The default constructor for CSVWriter and CSVReader are inconsistent
Hello Jon - I am marking this one as won't fix as it is a bug that is not a bug but is really a bug.... This situation was created in the early days because of conflicting requests/requirements/bug entries in the early days and the issue arose that any change to correct one issue would cause others to raise bugs because their code, coded the way it worked previously, broke. People complain to me about being too stuck on backwards compatibility but when you get to a point where you cannot upgrade...
Oh Guido, Guido, Guido, Guido, Guido. You are going back to stating something that is NOT in the specification Rule 6 specifies CRLF, comma or doublequote. it does not state CR, LF, or CRLF. It is not just because of the limited capacity, though I thank you for actually acknowledging that, it is the years before I created the RFC4180Parser that I got literal hate mail that opencsv, which existed BEFORE the RFC4180 specification did not support the RFC4180 specification and constantly showing how...
When in doubt - quotes all about :D
Yes - in cases like this my advise is to just turn quotes on all the time. It is still legal csv and that protects you from oddities in character sets from older operating systems or non ascii character sets.