Commit c370d099 authored by Matija Obreza's avatar Matija Obreza
Browse files

UTF-8 for CSVs

parent 0a0121c3
package org.genesys2.anno.parser;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
......@@ -40,9 +42,12 @@ public class CsvDataSourceParser extends BasicDataSourceParser {
int maxRows) throws UnsupportedDataFormatException, IOException {
List<Object[]> rows = new ArrayList<Object[]>();
String charsetName = "UTF-8";
Reader reader = null;
try {
reader = new FileReader(sourceFile);
reader = new InputStreamReader(new FileInputStream(sourceFile),
Charset.forName(charsetName));
} catch (FileNotFoundException e) {
throw e;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment