mojira.dev
MC-118165

Functions do not apply formatting codes correctly

Notepad++ automatic encoding detection bug

Since Notepad++ is commonly used when working with functions you should be aware that there is a bug which causes the encoding to become TIS-620 if your file contains the § character at the beginning of a line or with a space in front.

To prevent this bug from happening disable "Autodetect character encoding" in "Settings" > "Preferences..." > "MISC".

Items given through functions don't apply color or formatting codes correctly. Screenshots are provided below as to what happens.

Linked issues

Attachments

Comments 6

Attach the function here.

I've attached the function.
The area I'm having the issue at is near the top, where I'm using /replaceitem commands. These were working just fine before I tried using functions.

Could please see if your function file is encoded correctly, it should use UTF-8 without BOM.

It was not encoded correctly. Sorry! The issue's fixed now.

Can someone explain me the diffrence between UTF-8 and UTF-8 without BOM?

BOM adds invisible characters, which break syntax.

Ethan Brown

(Unassigned)

Unconfirmed

Minecraft 1.12 Pre-Release 7

Retrieved