Unicode-enabled CSV parameter in Java

I am looking for a Java implementation for a CSV (comma-separated value) parser with proper Unicode data processing, for example. UTF-8 CSV files with Chinese text. I believe that such a parser should use code point related methods during iteration, comparison, etc. An Apache 2 license or similar work will work best.

+3
source share
3 answers

I do not believe in reinventing the wheel. Therefore, I do not want to write my own parser and experience the same headaches as others.

I personally like the CSV Parser from Ostermiller . They also have a Maven repository if they are interested.


You can also check OpenCSV . There is an overflow of the question stack already about unicode parsing.

+4
source

Have you tried Commons CSV ?

0
source

. FileInputStream InputStreamReader, UTF-8. BufferedReader, readLine(). . .

- , , .

The approach above is a bit inefficient, but fast enough for most applications. If you have real performance requirements, you need something that is repeated through characters. I wrote one a few years ago that uses a state machine that worked fine.

-1
source

Source: https://habr.com/ru/post/1726474/


All Articles