Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

OpenSesame automatically converts Chinese characters to numbers

edited July 2019 in OpenSesame

My wordlist (in Chinese) contains numbers, e.g., 三, which means three in Chinese. I found that OpenSesame automatically converts this to "3". Please see the attached screenshot. It also converts other Chinese characters, to 5, 6, 7, 8, 100, etc. (I didn't test other numbers) How could I solve this problem? Thank you!


  • Hi,

    That sounds intriguing! I know that Opensesame automatically converts strings of numbers to integers, but I didn't know that this would also happen with in other numbers than arabic ones.

    See here:

    I'm not aware that there is anything you can do about it, other than adding characters to that string. For example, var.a = "1" will be interpreted as a number , but var.a=" '1' " will be interpreted as a string. Of course that is not ideal, so you have to see whether it will work for you. Another alternative (that is rather time consuming) is presenting the words not as text, but as images. Here you would have to make images for each word you want to present.

    Sorry for the inconvenience. @sebastiaan, is there another way to bypass the smart typing?


  • edited July 2019

    Hi @jiatian and @eduard ,

    That's very interesting. It took me a while to pinpoint where this comes from, but it's the fastnumbers library (used by datamatrix) that takes the liberty of converting the 三 to three. I'll fix that, because it should not do any conversions that changes the visual appearance of a character, even if they're semantically the same.

    For now, you can use HTML character notations, which won't be converted. For 三 this would be 三, where 19977 is the Unicode number of the symbol. Here's a simple function that gives you the HTML character notation for an arbitrary character.



  • edited July 2019

    Thank you @sebastiaan and @eduard, HTML character notations really help!

Sign In or Register to comment.