ID:2956750
 
Resolved
Files sent to the browser with UTF-8 BOM encoding loaded incorrectly when done via browse().
BYOND Version:516.1648
Operating System:Windows 10 Pro 64-bit
Web Browser:Chrome 131.0.0.0
Applies to:Dream Seeker
Status: Resolved (516.1649)

This issue has been resolved.
Descriptive Problem Summary:

When using file2text() and pretty much any method of turning a file into a usable string to do things like sending text to a browser, if the file has a UTF-8 BOM encoding, it will be interpreted as a raw text file regardless of context. This means it'll show raw HTML in a browser, for example.

Workarounds:

Don't use BOM encoding, it wasn't intentional in the first place so I'm not too worried about an engine-side fix being a priority (stripping the first line of bytes would turn BOM into not-BOM, which shouldn't break anything unless the file has a metric ton of objects in play)

Lummox JR resolved issue with message:
Files sent to the browser with UTF-8 BOM encoding loaded incorrectly when done via browse().