Storing Chinese characters in data file

OS : Win10
PsychoPy version : 1.83.04
Standard Standalone? (y/n) If not then what?: Y
What are you trying to achieve?: I am using code provided on GitHub by user jacanterbury ( to allow participants to type a response on the screen. Their task is to listen to Chinese words and type what they hear. I’ve been able to type the Chinese characters just fine and they appear on the screen beautifully. My problem is that I need these characters to appear in the data file in order to score responses, and all I’m getting is something like this: 麻雀 instead of “麻雀”, for example.

What did you try to make it work?: I am extremely inexperienced - I’ve never learned or done any real coding, and I’m working in the builder view. I have no idea how to edit or even find the specifications of the data file, but I am willing to learn. Any help would be appreciated, and I will be happy to provide further information as necessary.

Hi Kyra. Taking a look at that experiment, he hasn’t coded it in a way that will be successful for non-ASCII characters (i.e. anything not found on an English keyboard).

You can try this, which does at least account for unicode:

typingDemo.psyexp (8.5 KB)

But I’m going to be honest, if it doesn’t work I won’t be entirely sure how to help (of course maybe others in this forum will). Typing in Chinese is pretty complicated, as there are a number of different ways it is done, and I’m not sure how well they will play with psychopy. Psychopy keyboard entry is more designed toward collecting every keyboard press, and to type Chinese there is an extra layer of abstraction to convert key presses into characters (obviously, since Chinese is not phonemic, but is logographic, so no keyboard could possibly fit every character).

So let’s see if that file will work for you. If not, we’ll have to talk more, and may need someone with more experience to tell us if there is a good way to type in Chinese with psychopy. Later!

Hi Daniel. I just wanted to say thank you for your help! I haven’t had enough time to play around with the file yet so I’m not sure if it will work out or not. I think if PsychoPy can store the characters as unicode, that should be good enough for me because I can use an online converter tool to get the characters from that. I’ll get back to you again in a few days and let you know how it went.