Code Monkey home page Code Monkey logo

Comments (1)

cygri avatar cygri commented on June 2, 2024

There are two different encodings here. \u7259\u89E6\u75DB and %E7%89%99%E8%A7%A6%E7%97%9B.

D2RQ outputs an older version of the N-Triples format where non-ASCII characters had to be escaped as \uXXXX Unicode escapes. This is why we see \u7259\u89E6\u75DB. That should not be a problem. When the N-Triples file is read into another RDF software, these characters will be unescaped and turned back into the original Chinese characters. (In newer versions of Turtle, this escaping is no longer necessary, but it shouldn't be a problem.)

The %E7%89%99%E8%A7%A6%E7%97%9B encoding is only used when D2RQ generates URIs with non-ASCII characters in them. This is arguably a bug in D2RQ. URIs can contain only US-ASCII characters, and therefore D2RQ applies percent-encoding to characters outside the US-ASCII range. But URIs in RDF (and hence N-Triples) are actually IRIs, which support the full Unicode range. So D2RQ shouldn't do the %-encoding.

from d2rq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.