|Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread|
|Messages 1 to 4 of 4 total|
|RTC server sending extended characters|
|Sat, May 13 2017 4:49 PM||Permanent Link|
Using a custom RTC server with EWB and I am having problems sending extended characters (Norwegian) from the server to EWB.
In the response header I use:
aServer.Response['Cache-Control'] := 'no-cache';
aServer.Response['Content-Type'] := 'application/json; charset=utf-8';
and I also UTF8Encode the JSON return string.
However, in EWB the Norwegian characters are not decoded correctly.
Does anybody know how to format the response correctly so that EWB handles these extended characters?
|Sat, May 13 2017 6:03 PM||Permanent Link|
I think it has been established that you must not encode the text yourself.
Just pass back the Unicode as you want.
If that doesn't fix it, please provide some examples.
|Sun, May 14 2017 7:06 AM||Permanent Link|
Tactical Business Corporation
I don't have issue with my RTC server - I send strings using Utf8.
I have not used Norwegian characters, but I know French characters work properly.
Sending to EWB app - use UTF8Encode
sRow := sRow + Format('"%s": "%s"',[sField, Utf8Encode(sValue)]);
Receiving from EWB - use UTF8Decode
tbX.FieldByName(jafter.ValueByIndex[j].Name).AsString := UTF8Decode(jafter.ValueByIndex[j].AsString);
|Mon, May 15 2017 2:28 PM||Permanent Link|
Tim Young [Elevate Software]
Elevate Software, Inc.
<< However, in EWB the Norwegian characters are not decoded correctly. >>
Just to note: EWB doesn't decode anything, this is all handled by the browser via the XMLHttpRequest "class".
The response headers from the web server response essentially determines how the browser converts the data into Unicode strings.