# Some bugs in query when try utf8 predicates

**URL:** https://discuss.dgraph.io/t/some-bugs-in-query-when-try-utf8-predicates/2691
**Category:** Dgraph
**Created:** [June 5, 2018, 9:59am UTC](https://discuss.dgraph.io/t/some-bugs-in-query-when-try-utf8-predicates/2691 "2018-06-05T09:59:48Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![BlankRain](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/blankrain/32/1592_2.png) [@BlankRain](https://discuss.dgraph.io/u/BlankRain)
#### Post date: [June 5, 2018, 9:59am UTC](https://discuss.dgraph.io/t/some-bugs-in-query-when-try-utf8-predicates/2691/1 "2018-06-05T09:59:48Z")

</div>

1. prepare data

```auto
{
  set{
    <_:alice> <身高> "180" .
    <_:tom> <喜欢> <_:alice> .
  }
} 

```

and it returns

```auto
"data": {
    "code": "Success",
    "message": "Done",
    "uids": {
      "alice": "0x1f21ed",
      "tom": "0x1f21ee"
    }
  }

```

then ,check the tom’s predicate

```auto
{
  tom_predicate(func: uid(0x1f21ee)){
    _predicate_
  }
}

```

it returns

```auto
"data": {
    "tom_predicate": [
      {
        "_predicate_": [
          "喜欢"
        ]
      }
    ]
  },

```

I want to use it in a query.

```auto
{
  tom_expand(func: uid(0x1f21ee)){
    expand(_all_){
      expand(_all_)
    }
  }
}

```

it returns

```auto
"data": {
    "tom_expand": [
      {
        "喜欢": [
          {
            "身高": "180"
          }
        ]
      }
    ]
  }

```

from now on ,It all works.

The true question is  
I can’t write a query like this:

```auto
{
  alice_height(func: uid(0x1f21ed)){
  
    身高
  }
}

```

it returns an error

```auto
while lexing { alice_height(func: uid(0x1f21ed)){ 身高 } }: Unrecognized character in lexText: U+8EAB '身'

```

---

<div class="post-metadata">

### Author: ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)
#### Post date: [June 5, 2018, 4:35pm UTC](https://discuss.dgraph.io/t/some-bugs-in-query-when-try-utf8-predicates/2691/2 "2018-06-05T16:35:52Z")

</div>

I can reproduce this. I believe that characteres of Hanzi(?) is no supported. There would be support for various languages and characters in Object string (Edge). I would recommend using predicates in english or even alphabetic fonetic (latin).

> Tested in Ratel  
> Result: Could not alter schema: while lexing 身高: int .: Invalid schema. Unexpected 身

---

<div class="post-metadata">

### Author: ![BlankRain](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/blankrain/32/1592_2.png) [@BlankRain](https://discuss.dgraph.io/u/BlankRain)
#### Post date: [June 11, 2018, 9:40am UTC](https://discuss.dgraph.io/t/some-bugs-in-query-when-try-utf8-predicates/2691/3 "2018-06-11T09:40:12Z")

</div>

Thanks a lot.  
I’m looking forward to the support for

> [@MichelDiz](#):
>
> various languages and characters in Object string (Edge).

😃😃😃

---

<div class="post-metadata">

### Author: ![shanghai-Jerry](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/shanghai-jerry/32/863_2.png) [@shanghai-Jerry](https://discuss.dgraph.io/u/shanghai-Jerry)
#### Post date: [June 13, 2018, 9:44am UTC](https://discuss.dgraph.io/t/some-bugs-in-query-when-try-utf8-predicates/2691/4 "2018-06-13T09:44:44Z")

</div>

depend on you now to support Chinese

---

<div class="post-metadata">

### Author: ![BlankRain](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/blankrain/32/1592_2.png) [@BlankRain](https://discuss.dgraph.io/u/BlankRain)
#### Post date: [June 14, 2018, 10:17am UTC](https://discuss.dgraph.io/t/some-bugs-in-query-when-try-utf8-predicates/2691/5 "2018-06-14T10:17:56Z")

</div>

hi ,micheldiz.  
I find a way to use chinese in query.

> [@BlankRain](#):
>
> {  
> alice\_height(func: uid(0x1f21ed)){
> 
> ```
> 身高
> 
> ```
> 
> }  
> }

it errors .  
However ,if I write

```auto
{
  alice_height(func: uid(0x1f21ed)){
    <身高>
  }
}

```

It works.

---

<div class="post-metadata">

### Author: ![BlankRain](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/blankrain/32/1592_2.png) [@BlankRain](https://discuss.dgraph.io/u/BlankRain)
#### Post date: [June 14, 2018, 10:19am UTC](https://discuss.dgraph.io/t/some-bugs-in-query-when-try-utf8-predicates/2691/6 "2018-06-14T10:19:12Z")

</div>

老哥你说啥~ 啊 哈  
半天没反应过来…  
😂

---

<div class="post-metadata">

### Author: ![shanghai-Jerry](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/shanghai-jerry/32/863_2.png) [@shanghai-Jerry](https://discuss.dgraph.io/u/shanghai-Jerry)
#### Post date: [June 14, 2018, 10:31am UTC](https://discuss.dgraph.io/t/some-bugs-in-query-when-try-utf8-predicates/2691/7 "2018-06-14T10:31:39Z")

</div>

ref [Special Characters in values](http://discuss.hypermode.com/t/special-characters-in-values/2685)

If your predicate has special characters, then you should wrap it with angular brackets while asking for it in the query. E.g. \< first:name \>

---

<div class="post-metadata">

### Author: ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)
#### Post date: [June 14, 2018, 12:49pm UTC](https://discuss.dgraph.io/t/some-bugs-in-query-when-try-utf8-predicates/2691/8 "2018-06-14T12:49:53Z")

</div>

So in that case I was wrong. I never used special characters before. So for me Chinese characters in predicates was not supported.

That’s good news for language like Japanese, Chinese, Russian, Indian, Arabic and so on.
