attractplus icon indicating copy to clipboard operation
attractplus copied to clipboard

Unicode Support in Squirrel

Open rgavril opened this issue 1 year ago • 2 comments

I noticed that squirrel strings in attract mode don't support Unicode escape chars. Can that be added in?

For example this works great on squirrel 3.2 but fails when run in a attract mode layout:

local text = "OK, Maybe It\u2019s Too Much Pepper\n";
print(text);

rgavril avatar Feb 12 '25 09:02 rgavril

Unfortunately it's not that easy. We've tried to update Squirrel to the latest version, but Squrrel also needs a new Sqrat, a c++ bridge, which did not play well with AM.

oomek avatar Feb 12 '25 10:02 oomek

Thanks, would be nice to have but I can work around that for the moment.

rgavril avatar Feb 12 '25 10:02 rgavril

The workaround is to use UTF-8 https://www.cogsci.ed.ac.uk/~richard/utf-8.cgi?input=2019&mode=hex

local text = "OK, Maybe It\xE2\x80\x99s Too Much Pepper\n";
print(text);

oomek avatar Jul 05 '25 16:07 oomek