Strings in B4R (and in Arduino) are mostly identical to arrays of bytes. There are no encoders or decoders.
This is different than other B4X tools where strings represent a set of characters.
You can use UTF8 strings in the IDE. For example:
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
Dim s As String = "שלום"
Log(s)
Log(s.Length)
End Sub
Output:
AppStart
שלום
8
The length is 8 because the 4 characters were converted to 8 bytes during compilation.