# How to make a msg.payload send ascii codes?

**URL:** https://discourse.nodered.org/t/how-to-make-a-msg-payload-send-ascii-codes/46537
**Category:** General
**Created:** [1 June 2021 04:23 UTC](https://discourse.nodered.org/t/how-to-make-a-msg-payload-send-ascii-codes/46537 "2021-06-01T04:23:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [1 June 2021 04:23 UTC](https://discourse.nodered.org/t/how-to-make-a-msg-payload-send-ascii-codes/46537/1 "2021-06-01T04:23:17Z")

</div>

I am sure it is easy/simple, but I am stuck how to exactly word the question.

I am needing to send ascii codes in a message, together with normal characters.

How do I combine them two types to one message?

Say I want to send..... ASCII 0xCB

So I want the message to be:

`Look at this >`0xBC`< and see what you get`

I'm guessing that will be close to how it is done, but not exactly.

---

<div class="post-metadata">

### Author: ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)
#### Post date: [1 June 2021 07:08 UTC](https://discourse.nodered.org/t/how-to-make-a-msg-payload-send-ascii-codes/46537/2 "2021-06-01T07:08:54Z")

</div>

Is this what you after - parseInt converts the hex string to decimal and then the String.fromCharCode converts that to the char

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/6/76119400243eebe16ede65067c9136cfc0ecc0e5.jpeg)

---

<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: [15 June 2021 07:09 UTC](https://discourse.nodered.org/t/how-to-make-a-msg-payload-send-ascii-codes/46537/3 "2021-06-15T07:09:46Z")

</div>

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