Discussion Forum

Save chinese or japanese words into typedb

I’m running typedb server in Win10. After inserting chinese or japanese data into entity both with console and PythonAPI, the result of match statement is displayed as “?�O”. I found that chinese and japanese words were correctly displayed for grakn after searching topics befor. Now how can I deal with this problem?

Welcome to TypeDB Console. You are now in TypeDB Wonderland!
Copyright (C) 2021 Vaticle

> database list
No databases are present on the server.
> database create tmp
Database 'tmp' created
> transaction tmp schema write
tmp::schema::write> define val sub attribute, value string;
                    
Concepts have been defined
tmp::schema::write> commit
Transaction changes committed

> transaction tmp data write
tmp::data::write> insert $s "的" isa val;
                  
{ $s "的" isa val; }
answers: 1, duration: 241 ms
tmp::data::write> commit
Transaction changes committed

> transaction tmp data read
tmp::data::read> match $x isa attribute;
                  
{ $x "的" isa val; }
answers: 1, duration: 141 ms
tmp::data::read> 

This is on MacOS, using TypeDB 2.3.0

can you show a similar reproducible example from your machie please?

This is my sample on Win10.
=============================
PS C:[software]\typedb-all-windows-2.3.1> .\typedb.bat console

Welcome to TypeDB Console. You are now in TypeDB Wonderland!
Copyright (C) 2021 Vaticle

transaction testdb data write
testdb::data::write> insert $t isa person, has name “张三”;

{ $_0 “??O” isa name; $t iid 0x966e80017fffffffffffffff isa person; }
answers: 1, duration: 114 ms
testdb::data::write> insert $t isa person, has name “伊藤花子”;

{ $_0 “???q” isa name; $t iid 0x966e80017ffffffffffffffe isa person; }
answers: 1, duration: 37 ms
testdb::data::write> commit
Transaction changes committed

transaction testdb data read
testdb::data::read> match $x isa person, has name $n;get $n;

{ $n “???q” isa name; }
{ $n “??O” isa name; }
answers: 2, duration: 10 ms
testdb::data::read>
=============================

This is the result in typedb workbase.

I have the same problem on Win10, using TypeDB 2.3.0.

database create tmp
Database ‘tmp’ created
transaction tmp schema write
tmp::schema::write> define val sub attribute, value string;

Concepts have been defined
tmp::schema::write> commit
Transaction changes committed

transaction tmp data write
tmp::data::write> insert $s “的” isa val;

{ $s “??” isa val; }
answers: 1, duration: 199 ms
tmp::data::write> commit
Transaction changes committed

transaction tmp data read
tmp::data::read> match $x isa attribute;

{ $x “??” isa val; }
answers: 1, duration: 137 ms

Hi there - can you try this on a linux machine as well, just to confirm? it could be a windows issue!

It’s OK on Linux. Seems like a windows issue.

do you mind filing an issue with reproduction steps on github? here: Issues · vaticle/typedb · GitHub

I’ve opened an issue #6435.