diff options
author | Nicholas Car <nick@kurrawong.net> | 2020-03-16 12:20:58 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-16 12:20:58 +1000 |
commit | 3baafa8f5e8b855fe99f033e95b9d27b39296e37 (patch) | |
tree | 969f8851e2fb1f93d7d0db89106468a10e6a58b2 /rdflib | |
parent | 41021d97e4077a53a7f7ba41294109775adf4435 (diff) | |
parent | 221875702aa440d20e9118796953cc58253581d9 (diff) | |
download | rdflib-3baafa8f5e8b855fe99f033e95b9d27b39296e37.tar.gz |
Merge pull request #906 from tgbugs/infixowl-manchester-encoding
infixowl.manchesterSyntax do not encode strings
Diffstat (limited to 'rdflib')
-rw-r--r-- | rdflib/extras/infixowl.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rdflib/extras/infixowl.py b/rdflib/extras/infixowl.py index f3ce40d3..fb033198 100644 --- a/rdflib/extras/infixowl.py +++ b/rdflib/extras/infixowl.py @@ -318,7 +318,7 @@ def manchesterSyntax(thing, store, boolean=None, transientList=False): for val in store.objects(subject=thing, predicate=OWL_NS.hasValue): return u'( %s VALUE %s )' % ( propString, - manchesterSyntax(val.encode('utf-8', 'ignore'), store)) + manchesterSyntax(val, store)) for someClass in store.objects( subject=thing, predicate=OWL_NS.someValuesFrom): return u'( %s SOME %s )' % ( @@ -329,7 +329,7 @@ def manchesterSyntax(thing, store, boolean=None, transientList=False): for s, p, o in store.triples_choices( (thing, list(cardLookup.keys()), None)): return u'( %s %s %s )' % ( - propString, cardLookup[p], o.encode('utf-8', 'ignore')) + propString, cardLookup[p], o) compl = list(store.objects(subject=thing, predicate=OWL_NS.complementOf)) if compl: return '( NOT %s )' % (manchesterSyntax(compl[0], store)) @@ -357,9 +357,9 @@ def manchesterSyntax(thing, store, boolean=None, transientList=False): return '[]' # +thing._id.encode('utf-8')+'</em>' label = first(Class(thing, graph=store).label) if label: - return label.encode('utf-8', 'ignore') + return label else: - return qname.encode('utf-8', 'ignore') + return qname def GetIdentifiedClasses(graph): |