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 = '•'

Edit

UTF-8 will be changed also in comments:

-- indentação

… will be converted to:

-- indentação

Workaround

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

2 Likes

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.

5 Likes