Bad encoding/lost of accented characters in WebHook

Hi !

I use webhook to reccord a chat conversation, works well ATM except for accented characters, example of webhook containing accented characters : (RAW content )

{“sessionId”:“0b3540e6-47a6-4e28-96e2-de55824cb8b9”,“uniqueSessionId”:“0b3540e6-47a6-4e28-96e2-de55824cb8b9_1618474252900”,“timestamp”:1618474286218,“from”:“con_Ry19NKY2Zl”,“to”:[“con_XPkX3J02Zx”],“type”:“msg”,“data”:"{“id”:“msg_KNILSVO5_FGA4IB0K5J”,“text”:“test : ???”,“time”:“2021-04-15T08:11:26.165Z”,“remote”:false}",“event”:“signalSent”}

Below debug log from JS on front app when chatting with accented characters: (Please focus on the data text, not other metadatas). Each side of text chat participants are correct (accented characters well displayed)

Request: method:sendMessage params:{“message”:"{“to”:[“con_XPkX3J02Zx”],“data”:"{\“t\”:\“test : éééééé\”}",“type”:“signal:tpg”}"} openvidu-browser-2.17.0.min.js:1:232846

Is there a way to fix that with some OpenVidu Server configuration ?

Hi,

This is probably caused because of text encodings. Try decoding the received HTTP entity with charset ISO-8859-1, which is the default one used by the internal Apache library.
Nonetheless, we have already updated all of encoding in openvidu-server and clients to use UTF-8 instead.

As ISO-8859-1 is limitted to 256 chars, probably many modern symbols will not work with it. This is a limitation brought by the default behavior of Apache library (org.apache.http) and as mentioned in the previous message is already fixed in OpenVidu master branch.

Thanks for your feedback !

[quote=“pabloFuente, post:3, topic:2951, full:true”]

You mean this will be fixed in the next release ? (so v2.18.0)

Hi, thanks for your feedback !

and as mentioned in the previous message is already fixed in OpenVidu master branch.

You mean this will be fixed in the v2.18.0 ?

Yes, it will be fixed when we publish 2.18 version.

1 Like