ID:2519752
 
Resolved
Linux's tendency to use UTF-8 natively in its locale caused problems when converting ANSI to Unicode. BYOND now attempts to use a non-UTF-8 locale in Linux, and if character conversion still fails, "wings it" in some routines.
BYOND Version:513.1494
Operating System:Linux
Web Browser:Firefox 68.0
Applies to:Dream Daemon
Status: Resolved (513.1495)

This issue has been resolved.
Descriptive Problem Summary:
http://www.byond.com/forum/post/2519337 is still present in 1494.

Code Snippet (if applicable) to Reproduce Problem:
world.log << copytext("&#128169;", 1, 2)
world.log << text2ascii(copytext("&#128169;", 1, 2))

(replace &#; 128169; with the poop emoji or something, it got encoded by the forum)

Expected Results:
Some mangled UTF-8, then some number.

Actual Results:
Nothing, then 0
Bug does not occur in 1493. It occurs in 1494.
In response to Steamp0rt
I actually had a problem uploading 513.1494. Are you sure you were on the right version?

[edit]
Confirmed correct behavior in 513.1494.
In response to Lummox JR
Hm, was the Linux build of 1494 also affected? The linux version was up, Dream Daemon said 1494, but the bug is not on the Windows version. Odd.
Just tested, bug happens on current Linux version of 1494, but not Windows.

$ DreamDaemon a.dmb
Fri Nov 1 00:12:57 2019
Auto-safety mode: safe (working directory access)
Welcome BYOND! (5.0 Beta Version 513.1494)
0

^C
Hmm, that's interesting. The locale fix wasn't tested in Linux but it really ought to be working there. Perhaps something is amiss in the conversion. I'll have to run some more tests I guess.
Lummox JR resolved issue with message:
Linux's tendency to use UTF-8 natively in its locale caused problems when converting ANSI to Unicode. BYOND now attempts to use a non-UTF-8 locale in Linux, and if character conversion still fails, "wings it" in some routines.