0

I have a csv file encoded with GB18030, and I want to use apache commons CSV to parse the file and get the chinese characters inside the file.

How to do this? as I got some wired character using default configuration.

Thanks

cinqS
  • 1,175
  • 4
  • 12
  • 32

1 Answers1

2

It turns out not a Apache Commons CSV package problem. It's java IO reader problem.

InputStreamReader isr = new InputStreamReader(new FileInputStream(file), Charset.forName("GB18030"));

Using specified charset when read file using java would help.

cinqS
  • 1,175
  • 4
  • 12
  • 32