Page MenuHomeFeedback Tracker

Warlords sector name can be incomplete
New, NormalPublic

Description

In all map's Warlords mode, when the first character of a location's name is non-ANSI character, it will be missed when setting up sectors.

This leads to some confusing situations:

(For reproducing simplicity I will use Stratis, with stringtable modified (see reproduce steps), as an example.)


(Where is “格”?)


(Where is “坦”?)

After some digging, I found the cause is how functions_f_warlords\warlords\fn_wlsectorssetup.sqf programmed:

......

_hubName = getText (_nearest >> "name");
_firstLetter = _hubName select [0, 1];
if ((toArray _firstLetter) isEqualTo [65533]) then {_firstLetter = _hubName select [0, 2]};
_toUpperFirstLetter = toUpper _firstLetter;
_toUpperFirstLetter = (toArray _toUpperFirstLetter) # 0;
_hubNameArr = toArray _hubName;
_hubNameArr set [0, _toUpperFirstLetter];
_hubName = toString _hubNameArr;

......

Here's a test with the code:

So I came up with a simple solution. By default, select can mess up non-ANSI characters. Luckily Arma 3 2.02 added forceUnicode. Just use forceUnicode 0; in the code, names will show up correctly.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Operating System Version
Windows 10 x64 19043.1466
Category
Ingame UI
Steps To Reproduce
  1. In stringtables change a map (e.g. Stratis) location's name to any Chinese word or any word from other non-ANSI launuage. (e.g. Girna -> "格尔纳", the corresponding Chinese transliteration of Girna).
  2. Start a map's (e.g. Stratis) Warlords game.
  3. See the sector name missed one character.

Event Timeline

RcINS created this task.Jan 26 2022, 11:43 PM