mojira.dev
MC-117449

options.txt is read with default OS encoding

The bug

It looks like the options.txt file is read and written using the default OS encoding. This can cause problems with resource packs whose name contains non-ASCII characters.

How to reproduce

  1. Create a resource pack with a non-ASCII character in its name or download the attached

[media]
  1. and place it in the resource pack folder

  2. Select the resource pack

  3. Restart the game
    → The resource pack is not selected anymore. Additionally the options.txt file shows a malformed resource pack name ("§3MC-117449.zip")

Linked issues

Attachments

Comments 11

Make sure your using UTF-8 encoding not ANSI encoding.

Impossible to check as it depend of Windows, the name of the pack is stored in the folder name and not in the pack.mcmeta file

It looks like the problem is that the options.txt file is read and written using the default OS encoding which likely in most causes fails to read and write non-ASCII correctly.

as it may depend of the OS, I've seen the bug on the creators update of Windows 10.

Confirmed for 1.12-pre5

1 more comments

@@unknown you are the reporter of the ticket which means you can edit the affected versions yourself and do not need to comment 😉

Pay attention to the fact that the next version of optifine for 1.12 will fix this bug, so if you see in a future release that this bug is fixed, you have to check without optifine.

This is still an issue for reading the file in 1.14. Writing the file does correctly specify a fixed UTF-8 format.

franswa

boq

Confirmed

(Unassigned)

encoding, options, resource-pack

Minecraft 1.12 Pre-Release 2, Minecraft 1.12 Pre-Release 5, Minecraft 1.12 Pre-Release 6, Minecraft 1.12, Minecraft 1.14.1

1.15 Pre-release 5

Retrieved