Encoding of CSV results of a SELECT query

Greetings SPARQLers,

I have an RDF dataset that contains Unicode UTF-8 characters in literal values (but theoretically could also be in an IRI).

I do a query against the dataset using SPARQL 1.1 Protocol and specify I want CSV results with this header:

    Accept: text/csv

The SPARQL 1.1 Query Results CSV and TSV Formats recommendation states:

> Systems providing these formats should note that the content types for CSV is text/csv and for TSV text/tab-separated-values.
> Being text/*, the default character set is US-ASCII. The charset parameter should be used in conjunction with SPARQL Results;
> UTF-8 is recommended: text/csv; charset=utf-8 and text/tab-separated-values; charset=utf-8.

As the Accept header in the request does not specify a charset, should the server respond with `text/csv; charset=utf-8` or default to `text/csv; charset=iso-8859-1`?

In case the latter, should the server return an error if the results include UTF-8 characters?

Regards,

John Walker
Principal Consultant & co-founder

Semaku B.V. | Torenallee 20 (SFJ 3D) | 5617 BC Eindhoven | T +31 6 475 22030 | https://semaku.com/
KvK: 58031405 | BTW: NL852842156B01 | IBAN: NL94 INGB 0008 3219 95

Received on Friday, 19 January 2018 23:32:12 UTC