Skip to content

Commit

Permalink
Added charset=UTF-8 in Content-Type and Encoded the update paramenter…
Browse files Browse the repository at this point in the history
… to UTF-8.
  • Loading branch information
KMax committed Feb 15, 2014
1 parent c429c4e commit 0fe5885
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rdflib/plugins/stores/sparqlstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"""
SPARQL_POST_UPDATE = "application/sparql-update"
SPARQL_POST_ENCODED = "application/x-www-form-urlencoded"
SPARQL_POST_ENCODED = "application/x-www-form-urlencoded; charset=UTF-8"

# Defines some SPARQL keywords
LIMIT = 'LIMIT'
Expand Down Expand Up @@ -628,7 +628,7 @@ def remove(self, spo, context):
def _do_update(self, update):
import urllib
if self.postAsEncoded:
update = urllib.urlencode({'update': update})
update = urllib.urlencode({'update': update.encode("utf-8")})
self.connection.request(
'POST', self.path, update.encode("utf-8"), self.headers)
return self.connection.getresponse()
Expand Down

0 comments on commit 0fe5885

Please sign in to comment.