diff --git a/src/fcrepo/connection.py b/src/fcrepo/connection.py index 454a15f..f020204 100644 --- a/src/fcrepo/connection.py +++ b/src/fcrepo/connection.py @@ -78,8 +78,6 @@ def open(self, url, body='', headers=None, method='GET',): try: logging.debug('Trying %s on %s' % (method, url)) #we can't have unicode characters floating around in the body - if isinstance(body, basestring): - body=body.encode('ascii','xmlcharrefreplace') self.conn.request(method, url, body, headers) return check_response_status(self.conn.getresponse()) except (socket.error, diff --git a/src/fcrepo/wadl.py b/src/fcrepo/wadl.py index cfcba4b..cd8b52e 100644 --- a/src/fcrepo/wadl.py +++ b/src/fcrepo/wadl.py @@ -71,6 +71,11 @@ def submit(self, body='', **params): for param, value in self.undocumented_params.items(): if not param in qs: qs[param] = value + + #change to utf8 to let unicode pass through urlencode + for key in qs: + qs[key] = qs[key].encode('utf8') + if qs: self.url = '%s?%s' % (self.url, urllib.urlencode(qs))