2

I am a newbie on OPA and Rego, evaluating OPA for one of my applications. My application support localization and multiple languages. One of them is Simple Chinese. When I tried to evaluate a simple Rego rule consisting of some simple Chinese characters, I have received an error.

Error:

 rego_parse_error: illegal token input.city == '米尔福德'

Sample rule:

city  := {"city" : input.city}{
      input.city == '米尔福德'
  }

Does Rego support UTF-8 character set, and can rules be written on values containing special characters like above?

Will Beason
  • 3,417
  • 2
  • 28
  • 46
Kavish
  • 21
  • 1

1 Answers1

0

Single quotes does not denote a string in Rego. Using double quotes your rule works as expected.

Devoops
  • 2,018
  • 8
  • 21