frictionlessdata / tableschema-java

A Java library for working with Table Schema.
MIT License
25 stars 21 forks source link

Character set of a Table's DataSourceFormat can't be set #77

Open iSnow opened 1 year ago

iSnow commented 1 year ago

Test is TableEncodingTests::createTableFromIso8859() (currently disabled) and is an adaptation of https://github.com/frictionlessdata/datapackage-java/issues/43 (as the datapackage code relies on tableschema to read resources)

The following fails:

File testDataDir = getTestsuiteDataDirectory();

Table table = Table.fromSource(new File("csv/encodings/iso8859.csv"), testDataDir, null, null);

Iterator<Object[]> iter = table.iterator();
Object[] row = iter.next();
Assertions.assertEquals("Réunion", row[0]);

What needs to be done is ensure the code in TableDataSource concrete implementations can be configured to read from different encodings.


Please preserve this line to notify @iSnow (lead of this repository)