Inline C will not help here.
You can run this B4J code to create an array of bytes with any encoding you like:
Sub StringToArrayOfBytes(s As String, Encoding As String) As String
Dim sb As StringBuilder
sb.Initialize
sb.Append("Array As Byte(")
For Each b As Byte In s.GetBytes(Encoding)
sb.Append(Bit.And(0xff, b)).Append(",")
Next
sb.Remove(sb.Length - 1, sb.Length)
sb.Append(")")
Return sb.ToString
End Sub
Example:
Log(StringToArrayOfBytes("שלדךגחשדךלג", "utf-32"))
Output:
Array As Byte(0,0,5,233,0,0,5,220,0,0,5,211,0,0,5,218,0,0,5,210,0,0,5,215,0,0,5,233,0,0,5,211,0,0,5,218,0,0,5,220,0,0,5,210)
Use it instead of using a constant string.