y0014984 / Advanced-Equipment

Advanced Equipment is a Arma 3 mod, that brings equipment to life, like laptops and lamps.
Other
27 stars 10 forks source link

Check code for places that need 'forceUnicode' #405

Open y0014984 opened 9 months ago

y0014984 commented 9 months ago

Unfortunately, string length counts bytes but not characters. That means that unicode characters count 2 bytes instead of one. In scripts you can change this behavior with the forceUnicode command. Affected commands are:

So, every time we use one of these commands and the affected string could be a user generated unicode character we should take account for that. I have already done that at one place in PR #402 for the function fnc_terminal_removeCharFromInput.sqf