mojira.dev
MC-124179

Translations are displayed UTF-8 encoded

The bug

It appears the new language files are not read using UTF-8 (without BOM) as encoding or the game actively encodes the read content using UTF-8 again.

For example € (\u20AC) is displayed as € which is its UTF-8 encoded representation.

How to reproduce

  1. Download the attached file

[media]
  1. and place it in your resourcepacks folder

  2. Load the resource pack

  3. Use the following command

    /tellraw @s {"translate":"utf_8_test"}

The language file is properly encoded using UTF-8 without BOM and contains the following:

{
  "utf_8_test": "✓ (check mark)\n★ (star)\n☂ (umbrella)\n€ (Euro sign)"
}

But in-game the following is shown:

✓ (check mark)
★ (star)
☂ (umbrella)
€ (Euro sign)

Linked issues

Attachments

Comments 3

Please also provide a screenshot showing what it should look like.

The error is related to the choice of the wrong encoding when you open the language file. Judging by the symbols, I found out that the file opens with the encoding of the Windows 1251, but should with the encoding of UTF-8.

I attached a resource pack which makes it hopefully slightly easier to reproduce

Sergey

Nathan Adams

Confirmed

language-file, resource-pack

Minecraft 18w02a

Minecraft 18w03a

Retrieved