ID:2519337
 
Resolved
Sometimes strings that contained ANSI, or had to be re-encoded because they contained malformed UTF-8, did not get added to the string tree properly.
BYOND Version:513.1492
Operating System:Windows 10 Pro 64-bit
Web Browser:Firefox 68.0
Applies to:Dream Daemon
Status: Resolved (513.1493)

This issue has been resolved.
Descriptive Problem Summary:
If a UTF-8 character is cut off in the beginning/end of copytext, it can result in a blank output

Numbered Steps to Reproduce Problem:
1. Have UTF-8 string
2. Copytext

Code Snippet (if applicable) to Reproduce Problem:
var/text = "Lorem ípsum dolór sit amét"
world.log << copytext(text, 1, length(text)-1)

var/text = "¡Lorem ipsum dolor sit amet"
world.log << copytext(text, 2, length(text)+1)


Expected Results:
Lorem ípsum dolór sit am[insert horribly mangled utf-8 character]

Actual Results:
Nothing.

Does the problem occur:
Every time? Or how often? Every time

When does the problem NOT occur?
When using normal ASCII text, or if copytext doesn't cut off the UTF-8 TEXT.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? 512, for obvious reasons

Workarounds: Don't have UTF-8 at the beginning/end of copytext

Lummox JR resolved issue with message:
Sometimes strings that contained ANSI, or had to be re-encoded because they contained malformed UTF-8, did not get added to the string tree properly.