Page MenuHomeFeedback Tracker

Add string::SubstringUtf8 and string::LengthUtf8
Closed, ResolvedPublic

Description

Please port the two methods SubstringUtf8 and LengthUtf8 from the DayZ code base into Enfusion core / expose them in the AR build of the engine.

Details

Severity
Minor
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
General

Event Timeline

Arkensor created this task.Jun 6 2023, 9:04 AM
Geez changed the task status from New to Assigned.Jun 6 2023, 2:39 PM
Geez closed this task as Resolved.Jun 6 2023, 3:49 PM
Geez claimed this task.
Geez added a subscriber: Geez.

Hello Arkensor, according to the devs:
We do not support utf in script string.

@Geez that I can not quite agree with, given how DayZ has utf8 support because of the launch in China so it supports Chinese utf8 chars. I would be surprised if it was only present in DayZ's engine fork. Please ask for clarification again.
The only possibility of the answer being true ist if the utf8 versions in DayZ are sham and do not actually work/do anything and its just the default WANSI strings operations under the hood.

dedmen added a subscriber: dedmen.Jun 6 2023, 4:00 PM

I'm pretty sure scripting supports UTF8.. You can set UTF8 string to UI widget text.
And you get UTF8 string back from UI widget text input fields.

Geez added a comment.Jun 6 2023, 4:07 PM

@Geez that I can not quite agree with, given how DayZ has utf8 support because of the launch in China so it supports Chinese utf8 chars. I would be surprised if it was only present in DayZ's engine fork. Please ask for clarification again.
The only possibility of the answer being true ist if the utf8 versions in DayZ are sham and do not actually work/do anything and its just the default WANSI strings operations under the hood.

Further clarification from the responsible dev:

Game UI and language database text supports UTF8 (both Reforger and DayZ), but script string do not support UTF8 (in both Reforger and DayZ). Fact that in DayZ branch there are two methods which working with UTF8 (SubstringUtf8 and LengthUtf8) does not mean there is support of UTF8 and does not mean that they must be ported to Reforger.

I feel bad for making you play Messenger here, but I would like to point out to the responsible dev that we need support for in script because we can as he said, have utf8 in the UI, and thus we need to handle utf8 chars that appear in the setter or getter code when interacting with widgets, or things like player names or chat messages that have utf8 characters. Declaring that string myutf8string = "Hällö fröm the öther Sßide こんにちは世界" can not be possible or even worse - is not needed - is not comprehensible for me. If there is no support for it right now then it should be added for sure.

Geez added a comment.Jun 9 2023, 11:08 AM

Hello Arkensor.
While the dev has read this and there was a discussion in regards to this topic internally, at the moment there are still no plans to introduce utf support in scripting.