Bug #201
openAccept-Charset HTTP header not honored
0%
Description
(This ticket obsoletes #197)
Currently there doesn't seem to be a way to request a specific character encoding for query results. I think the way to do this is via content negotiation; at least I haven't seen any way to make such a request in SPARQL, but I might be wrong about that. In any case, I need a way to definitely indicate that I want utf-8 for the results.
The Mulgara HTTP interfaces (version 2.1.3) don't seem to honor the Accept-Charset header. Ideally it should be possible to use the header to stipulate any encoding for XML results. For JSON results, it should be possible to stipulate any UTF (utf-8, utf-16, utf-32) or UCS (UCS-4; I understand UCS-2 is obsolete.)
Updated by Gregg - over 15 years ago
Replying to gar:
(This ticket obsoletes #197)
The Mulgara HTTP interfaces (version 2.1.3) don't seem to honor the Accept-Charset header. Ideally it should be possible to use the header to stipulate any encoding for XML results. For JSON results, it should be possible to stipulate any UTF (utf-8, utf-16, utf-32) or UCS (UCS-4; I understand UCS-2 is obsolete.)
Clarification: Accept-Charset can (should?) only be set by the User Agent, not the User. See Section 4.6.2 of the XMLHttpRequest draft; in fact the UA is obliged to terminate an AJAX request if the user tries to set it. So I guess the only way to indicate a preferred results encoding is to use the charset= subfield of the Accept header.