I just copied the issues over, eikeon actually implemented the fix.

However, the nt serializer code has been through many subsequent changes, I 
doubt any of the 2009-vintage code remains.

fwiw, it roundtrips just fine and RDFLib's serialization seems consonant 
with Jena's:

$ cat ttest.nt 
<urn:aap> <urn:noot> "miës" .
$ riot ttest.nt
<urn:aap> <urn:noot> "miës" .
$ cat ttest2.nt 
<urn:aap> <urn:noot> "mi\u00EBs" .
$ riot ttest2.nt
<urn:aap> <urn:noot> "miës" .


On Monday, August 1, 2022 at 12:23:01 PM UTC epost...@gmail.com wrote:

> The current ntriple serialization of rdflib does not seem to do proper 
> unicode escaping as it should with 
> https://www.w3.org/TR/rdf-testcases/#ntrip_strings.
>
> As a test, doing: 
>
> g = Graph()
> g.add( (URIRef("urn:aap"), URIRef("urn:noot"), Literal("miës")) )
> print(g.serialize(format="nt"))
>
> Expected:
> <urn:aap> <urn:noot> "mi\u00EBs" .
> But it produces:
> <urn:aap> <urn:noot> "miës" .
>
> There seems to be an ancient issue fixing encodings:
> https://github.com/RDFLib/rdflib/issues/38
> But I could not track down how to read what patch it referred to.
>
> This seems like such a basic fundamental thing, hopefully I am just 
> missing something obvious?
>

-- 
http://github.com/RDFLib
--- 
You received this message because you are subscribed to the Google Groups 
"rdflib-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rdflib-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rdflib-dev/070b4bce-0fd3-4e81-a541-846eb45de95en%40googlegroups.com.

Reply via email to