# Sending Unicode characters via HTTP Request

**URL:** https://discourse.nodered.org/t/sending-unicode-characters-via-http-request/34990
**Category:** General
**Created:** [28 October 2020 22:18 UTC](https://discourse.nodered.org/t/sending-unicode-characters-via-http-request/34990 "2020-10-28T22:18:20Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![darkdude](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@darkdude](https://discourse.nodered.org/u/darkdude)
#### Post date: [28 October 2020 22:18 UTC](https://discourse.nodered.org/t/sending-unicode-characters-via-http-request/34990/1 "2020-10-28T22:18:20Z")

</div>

I need to interface a TTS service. Input for TTS is sent via POST requests.  
The message needs to include country-specific characters in Unicode.

On this flow:

```auto
[{"id":"f133ea37.e26a98","type":"http request","z":"7e633afb.9123fc","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://192.168.1.109:8122/text_to_speech","tls":"","persist":false,"proxy":"","authType":"","x":658.1666259765625,"y":51.66664123535156,"wires":[[]]},{"id":"844ffbc7.7b1","type":"change","z":"7e633afb.9123fc","name":"","rules":[{"t":"set","p":"headers","pt":"msg","to":"\"Content-Type: application/json\"","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"{\"text\":\"Woda nagrzana. Wy\\u0142\\u0105cz piec.\"}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":417.833251953125,"y":134.66664123535156,"wires":[["805da16c.9f729"]]},{"id":"805da16c.9f729","type":"exec","z":"7e633afb.9123fc","command":"curl -v --header \"Content-Type: application/json\" --request POST --data '{\"text\":\"Woda nagrzana. Wy\\u0142\\u0105cz piec.\"}' http://192.168.1.109:8122/text_to_speech","addpay":false,"append":"","useSpawn":"false","timer":"5","oldrc":false,"name":"","x":1128,"y":135.5,"wires":[[],[],[]]},{"id":"8393ef30.8e7388","type":"inject","z":"7e633afb.9123fc","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":240,"y":199,"wires":[["844ffbc7.7b1"]]},{"id":"4b3bc9a6.c668e8","type":"change","z":"7e633afb.9123fc","name":"","rules":[{"t":"set","p":"headers","pt":"msg","to":"\"Content-Type: application/json\"","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"{\"text\":\"Woda nagrzana. Wy\\u0142\\u0105cz piec.\"}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":428,"y":51,"wires":[["f133ea37.e26a98"]]},{"id":"9ffb9ed2.1a6538","type":"inject","z":"7e633afb.9123fc","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":238,"y":52,"wires":[["4b3bc9a6.c668e8"]]}]

```

when I try to use HTTP request and set msg.payload to be a JSON object, Unicode is converted to UTF-8 and TTS service does not recognize country specific characters.  
When i set msg.payload to be a string, HTTP request node does not work.

Exec node with curl works. Is it possible to make it work with HTTP Request?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [27 December 2020 22:18 UTC](https://discourse.nodered.org/t/sending-unicode-characters-via-http-request/34990/2 "2020-12-27T22:18:33Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
