ID:2591413
 
Resolved
Maptext wrapping sometimes was incorrect with Unicode characters, and could mangle them in some cases.
BYOND Version:513
Operating System:Windows 10 Enterprise 64-bit
Web Browser:Chrome 84.0.4147.89
Applies to:Dream Seeker
Status: Resolved (513.1528)

This issue has been resolved.
Descriptive Problem Summary:
When maptext has unicode (cyrillic) text, wrapping with maptext_width will sometimes mess up the output.
At a guess, wrapping isn't unicode-aware.

Numbered Steps to Reproduce Problem:
Run code. Frown.
Complete repro zip: https://drive.google.com/file/d/ 1_vjalLfR2Zu-tk6p0jNUOgS4GqaUC2zv/view?usp=sharing

Code Snippet (if applicable) to Reproduce Problem:
This code snippet doesn't work because the forums are auto-escaping the text.
/mob
maptext_height = 64
maptext_width = 150
maptext = "Сначала я думал я буду один."


Expected Results:
Last word on the first line should read "буду", but instead reads "буу".

Actual Results:
Text is mangled to "буу".
https://cdn.discordapp.com/attachments/678826323728400394/ 734496769555169400/unknown.png

Does the problem occur:
Every time? Or how often? Every time
In other games? Encountered in SS13, reproduced minimally
In other user accounts? Yes
On other computers? Yes

When does the problem NOT occur?
When text isn't wrapped. Increasing maptext_width to 1500 above works fine.
https://cdn.discordapp.com/attachments/678826323728400394/ 734496866770747463/unknown.png

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
n/a

Workarounds:
Don't wrap text, manually wrap text with br.
If the text is escaped with HTML entities, it wraps fine, for some reason.
Lummox JR resolved issue with message:
Maptext wrapping sometimes was incorrect with Unicode characters, and could mangle them in some cases.