Thanks, I was able to figure out the root cause and work out a fix. Hopefully will get in to 8.3.1, if not 8.3.2.
If you restart the gateway and the designer, it should work consistently until/unless you change the 'Script Message Encoding' property in the gateway settings.