There is no simple answer to your question ... "How to do the conversion to get the proper Unicode strings?" ... because it depends on the content you are converting.
A Unicode String is just an in-memory data type, but there are many ways to convert that in-memory data into something that can be transported over binary transports like TCP/IP. And the method needed for converting that content into a Unicode Text after receiving it, depends on the method used by the sender to convert their Unicode Text into data that can be transported over TCP/IP.
If you receive an UTF-8 encoded String, you can decode it into a Unicode String with the
Utf8Decode (takes a RtcString as parameter) or
Utf8DecodeEx (takes RtcByteArray as a parameter) function from the "
rtcSystem" unit. And if you need to convert a Unicode string into an UTF-8 encoded raw binary string, you can use the
Utf8Encode (returns a RtcString) or
Utf8EncodeEx (returns a RtcByteArray).
But ... if you are receiving content in any other format, then you will need to use a decoder that handles that format. Even though the RTC SDK does include a few functions for widely used formats like UTF-8 (Utf8Encode/Decode), URL (URL_Encode/Decode) and MIME (Mime_Encode/Decode), these are just some of the formats used (you won't find encoders and decoders for every possible data format in the RTC SDK), and ... it is your own responsibility to correctly encode the content before you send it out and/or decode the content you have received.
If you need more information about working with Unicode in Delphi, try searching for "Delphi Unicode" in
www.google.com or
www.duckduckgo.com or any other search engine.