Plugins not interpreting UTF-8 characters

Reproduction Steps

Put this on a plugin script and save it.

local var = '•'

Expected Behavior

The original character should be preserved.

Actual Behavior

When saving the script, it’s converting the bullet character to:

local var = '•'


UTF-8 will be changed also in comments:

-- indentação

… will be converted to:

-- indentação


I had to search for the utf-8 equivalent code for the bullet:

local var = utf8.char(8226) 

Issue Area: Studio
Issue Type: Display
Impact: High
Frequency: Constantly


It looks like currently .lua files in the plugins folder are loaded using the system text encoding, which defaults to Windows-1252 for English and Portuguese. It should really be using UTF-8 instead. I’ve filed this as a bug, we’ll look into it.


The fix is live as of today, plugin .lua files should now be loaded in as utf-8. Let me know if there are any other situations where utf-8 text gets mangled like this.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.