Closed otsakir closed 6 years ago
First things first. UTF-8 is capable of encoding all possible Unicode characters according to wikipedia: https://en.wikipedia.org/wiki/UTF-8
Thus, making sure that such characters are properly stored in Designer projects and then returned as valid UTF-8 rcml code to Restcomm should be enough.
I checked actual binary representation of emoji-containing Say/SMS elements. Both, filesystem storage and RCML code produced contain valid UTF-8 encoded byte sequences.
😀 --> F0 9F 98 80
I also ran some tests involving restcomm and Olympus. I created a Designer SMS application that responds back to the origin of the message it receives.
sent:
hhhh😀
asdfasdf
received:
welcome. echo: hhhh😀ME
Also, from wireshark i got:
POST /restcomm-rvd/services/apps/AP0a8b77f1b45a436b825fc05942386187/controller HTTP/1.1
http.protocol.content-charset: UTF-8
Content-Length: 130
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Host: 192.168.2.2:8080
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.2 (Java/1.7.0_80)
Accept-Encoding: gzip,deflate
SmsSid=SMed0c870ad02c43178af2572ba1c5cc7b&AccountSid=ACae6e420f425248d6a26948c17a9e2acf&From=alice&To=4455&Body=hhhh%F0%9F%98%80MEHTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/xml
Transfer-Encoding: chunked
Date: Mon, 30 Apr 2018 10:04:44 GMT
54
<Response>
<Sms to="alice" from="4455">welcome. echo: hhhh....ME</Sms>
</Response>
0
I sent two messages. The first did not result in a request for RCML. After the second a request was generated with both messages and for some reason a 'ME' part is added to the end as seen in the POST body above..
The bug described above was in Olympus and has been fixed now.
Make sure emoji characters are properly transmitted designer and restcomm.