Skip to content

NTSerializer only encodes in ASCII #1377

@tcmitchell

Description

@tcmitchell

The NTSerializer only encodes in ASCII and issues a warning if the encoding is anything other than "ascii". See nt.py line 22 and nt.py lines 27-28. See also #1376

The N-Triples Grammar says:

An N-Triples document is a Unicode [UNICODE] character string encoded in UTF-8.

This may be a change from earlier (pre-2014) versions of N-Triples. See the first bullet in Section 3 Changes from RDF Test Cases format. But this change is 7 years old.

Example 3 in Section 2.3 RDF Literals shows unicode characters in an example N-Triples document.

There is a mention of ASCII encoding in Section 6.1 Other Media Types but that is for passing N-Triples documents as text/plain. Section 6.1 goes on to say that "In ... these cases the document is not an N-Triples document" (emphasis mine).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions