datapackage-java
datapackage-java copied to clipboard
character set of a resource
Overview
It seems that the character set of a resource is not taken into account. Here is a simple test case with ISO8859-1 encoding.
URL url = new URL("https://opendata.zitsh.de/frictionless/haltestellen-smartes-dorfshuttle-stand-01-2022.json");
String jsonString = new Scanner(url.openStream()).useDelimiter("\\A").next();
ObjectNode resourceJson = (ObjectNode) JsonUtil.getInstance().createNode(jsonString);
Resource resource = Resource.build(resourceJson, null, false);
Iterator<String[]> iter = resource.stringArrayIterator();
while(iter.hasNext()) {
System.out.println(Arrays.toString(iter.next()));
}
Please preserve this line to notify @iSnow (lead of this repository)
Thanks for raising the issue! First off, sorry for the late answer, I was busy with other stuff and couldn't catch up with Github.
Concerning your issue, I can confirm that it is a valid bug. It doesn't just concern this project but also the tableschema-java project that is used here to read the data. Fixing it will required quite a bit of work...