Search code examples
maxscript

How can I use unicode characters in an encrypted maxscript


I have a .ms file type with the symbols ✖ and ✔ that I want to use.

Once I evaluate this file those characters appear correctly like so:

but not after encrypting the file to .mse, they then appear as a question marks like so:

enter image description here


Here's a snippet of code in it's raw .ms form. You will need to run this following piece of code to encrypt it. encryptScript @"path\to\file.ms" version:1

/* This file is saved with encoding UTF-8
and the 2 special characters show fine.

But when I 'encryptScript @"path\to\file.ms" version:1' they don't display correctly. */

rollout testRol "Test"
(
  button ui_btn_test "✔"
  label  ui_lbl_test "✖"
  )
createDialog testRol

Solution

  • You can escape them like this:

    button ui_btn_test "\x2714"
    label  ui_lbl_test "\x2716"