Title: Sending string from server to client Post by: YuraZ on December 03, 2012, 11:05:52 AM Hi,
I'm using RTC SDK 6. From TRtcFunction.OnExecute program is returning ciphered string, as Result.AsString := '...'. In debug window Result.AsString is showing as: #6')ђN'#$12'АeІ;—'#$B'Ќ'#$00AD'(Р’'#7'Eц$©вХуh'#$1A'Jѓ“•F”' But when I'm trying to receive this string on client on TRtcResult.OnReturn as Result.asString in debug windows is showing as: #6')?N'#$12'?e?;'#$0097#$B'?'#$00AD'(?'#$0092#7'E?$©???h'#$1A'J?'#$0093#$0095'F'#$0094 Why strings are different? What should i do to make this strings the same? Thanks. Title: Re: Sending string from server to client Post by: D.Tkalcec (RTC) on December 03, 2012, 01:23:30 PM Where does the original String come from? I mean the one you are assigning to Result.asString on the Server in the OnExecute event? It looks like that String contains 16-bit characters (ђ - for example).
The "asString" property will only send the lower 8 bits of each character (#0 - #255). If you want to send Unicode Strings, you should use "asText" instead of "asString". And if you want to send binary data (encrypted), you should use "asByteStream" or "asByteArray". Is the function you are using for generating the "cipher" returning a String, or is it returning something else and you have converted it into a String? Best Regards, Danijel Tkalcec Title: Re: Sending string from server to client Post by: YuraZ on December 03, 2012, 05:40:10 PM Thanks a lot!!!
Using asText solved my problem. :) |