TinkerPop Gremlin with Chinese

61 views Asked by At

I'm trying to query for vertices which contain Chinese characters.

I'm executing a groovy script via $gremlin.sh -e test.groovy

println g.V("丁壽全").next()

When trying to look up a vertex, which consists only of ASCII, it's found.

How should I encode the strings?

Thanks a lot

1

There are 1 answers

0
psmn On

I'm using gremlin-server connected to Stardog. A solution was to:

  import com.complexible.stardog.graph.ids.GraphIRI
  ... gremlin stardog plugin init...
  iri = new GraphIRI("http://someuri" + "chinese string")
  individual = g.V(iri)