Robot Framework’s Evaluate returns encoding error

I am using the Evaluate keyword to create an array of arrays as follows :

${ARRAY}=   Evaluate    [['one', 'two', 'thrée']]

The porblem is that after the evaluation by python 2 the variable ${ARRAY} contains :

INFO : ${ARRAY} = [['one', 'two', 'thrxc3xa9e']]

The problem is that the ‘é’ became xc3xa9.

The encoding used in my IDE is UTF-8 so I’m guessing it’s related to the default encoding used by python. I get this when running the following script to check used encoding in python :

cmd > python
 Python 2.7.18 ... [MSC v.1500 64 bit (AMD64)] on win32
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import sys;
 >>> print(sys.stdin.encoding, sys.stdout.encoding)
 ('cp850', 'cp850')
 >>> print(sys.getdefaultencoding())
 ascii

So I was wondering what can I do to fix this problem? Most answers I found were related to in script changes not for something that is initiated by a call from Robot Framework.

Answer

Upgrading to python 3 fixed the issue.