Skip to content

SPARQLConnector.update should set ContentType charset #2095

@robcast

Description

@robcast

I use rdflib to connect to a Blazegraph triplestore using the SPARQLUpdateStore.

When I add data containing non-ASCII characters using addN() it results in garbled data in the triplestore (UTF-8 interpreted as ISO-8859).

The problem seems to be that SPARQLConnector.update() does not set "charset=UTF-8" in the Content-Type header:

"Content-Type": "application/sparql-update",

but it does use UTF-8 in data=query.encode() in line 183.

The problem goes away if I patch the Content-Type to be "application/sparql-update; charset=UTF-8".

I can provide a PR with this one-line change if you like.

Metadata

Metadata

Assignees

No one assigned

    Labels

    SPARQLbugSomething isn't workinggood first issueGood for newcomersnetworkingRelated to networking.storeRelated to a store.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions