I have nonstandard CSV file with semicolon instead of comma as a separator and cp1251 encoded. Documentation is not clear in this case, and the sample doesn't work properly
declare %rest:path("/store.csv") %rest:POST("{$csv}") %input:csv("header=true") function page:store-csv($csv as document-node()) { "Number of rows: " || count($csv/csv/record) };
Even if I changed the encoding manually the next code does nothing %input:csv("separator=semicolon")
and returns text instead of document-node()
Could you check it?
It would be nice if you add additional encoding parameter to csv module.