UTF-8 Question


How do we place a unicode character into a string?


SkookumScript strings are 8 bit ASCII/ANSI and do not currently natively support Unicode. However, you can use decimal escape sequences, e.g. "Hello\33" = "Hello!", or hexadecimal "Hello\16r21". So you could produce e.g. the UTF-8 inverted exclamation sign by "\16rc2\16ra1Hello!". However, this does not currently convert into the corresponding UE4 UCS2 string. So, long story short, you currently cannot really place a Unicode character in a string.

What is it exactly that you want to do?


We plan to support Unicode in a future update and the new SkookumIDE is a step in that direction.

Until then, it is often good practice to use a data-driven mechanism and to not include any visible text in scripts. They are should be in files that are loaded depending on the language/locale. This also makes it easier to localize your project.

Sleeping Dogs was written in SkookumScript and was released for many different languages using data driven language info.


Thanks guys!