ID:2959019
 
Resolved
Loading UTF-8 BOM encoded files with file2text() included the format leader. While technically "correct" behavior, it was completely unwanted, so the format leader is now removed.
BYOND Version:515
Operating System:Windows 10 Pro 64-bit
Web Browser:N/A
Applies to:Dream Daemon
Status: Resolved (516.1649)

This issue has been resolved.
Descriptive Problem Summary:

Loading a text file that's encoded with UTF-8 BOM includes the BOM leader, which nobody needs.

Numbered Steps to Reproduce Problem:

1) Create a text file in any editor that lets you choose encoding.
2) Save the file in UTF-8 BOM format.
3) In any project, load the file into a var with file2text().

Code Snippet (if applicable) to Reproduce Problem:
var/txt = file2text("bomfile.txt")
if(text2ascii(txt) == 0xFEFF)
usr << "BOM character encoding detected"
Lummox JR resolved issue with message:
Loading UTF-8 BOM encoded files with file2text() included the format leader. While technically "correct" behavior, it was completely unwanted, so the format leader is now removed.

Login to reply.