ID:2777211
 
BYOND Version:514
Operating System:Windows 10 Home 64-bit
Web Browser:Chrome 99.0.4844.74
Applies to:Dream Maker
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary:
Saving a .dmi file with a Unicode state name produces an invalid PNG file. This could produce problems with other software reading/validating the file.

The DMI descriptor is placed in the zTXt chunk which is for Latin-1 text. Instead, it should be placed into iTXt which supports UTF-8.

http://www.libpng.org/pub/png/spec/1.2/ PNG-Chunks.html#C.zTXt

Numbered Steps to Reproduce Problem:
1. Create a new .dmi file
2. Add an icon state
3. Give the icon state a name with Unicode characters and save the file.
4. Open the file at https://www.nayuki.io/page/png-file-chunk-inspector
5. Observe the error Invalid ISO 8859-1 byte in text string on the zTXt chunk.

Expected Results:
The DMI descriptor should be placed into an iTXt chunk. The iTXt chunk may be similarly compressed as the zTXt chunk.

Actual Results:
The DMI descriptor is put in a zTXt chunk, though it does not contain Latin-1 text.

Is this a serious problem for anything, though?

Changing this would be extremely difficult at this point.