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.

6 Likes

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.

2 Likes

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