RTC Forums
November 24, 2024, 05:26:16 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Login
Register
RTC Forums
>
Subscription
>
Support
>
Sending string from server to client
Pages: [
1
]
« previous
next »
Print
Author
Topic: Sending string from server to client (Read 4555 times)
YuraZ
Newbie
Posts: 39
Sending string from server to client
«
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.
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Sending string from server to client
«
Reply #1 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
Logged
YuraZ
Newbie
Posts: 39
Re: Sending string from server to client
«
Reply #2 on:
December 03, 2012, 05:40:10 PM »
Thanks a lot!!!
Using asText solved my problem.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Dashboard
-----------------------------
=> General
=> 3rd-Party
=> Quick Start
-----------------------------
Subscription
-----------------------------
=> Support
Loading...