# ± symbol in ui\_text node label

**URL:** https://discourse.nodered.org/t/symbol-in-ui-text-node-label/49631
**Category:** General
**Created:** [11 August 2021 20:32 UTC](https://discourse.nodered.org/t/symbol-in-ui-text-node-label/49631 "2021-08-11T20:32:03Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![RaptorUK](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/raptoruk/32/46988_2.png) [@RaptorUK](https://discourse.nodered.org/u/RaptorUK)
#### Post date: [11 August 2021 20:32 UTC](https://discourse.nodered.org/t/symbol-in-ui-text-node-label/49631/1 "2021-08-11T20:32:03Z")

</div>

Hi folks,

simple question this time, is it possible to have a ± symbol in a ui\_text label ? if so how ?

I'm trying to do this, but a bit neater . . .  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/0/803ae508f1ad8c898b1113e9fdcdfe6fd0e971a2.png)

so it would be . . .

Volts 3.2 - 3.4 ± 21 - 23

as the label.

---

<div class="post-metadata">

### Author: ![Gunner](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gunner/32/43582_2.png) [@Gunner](https://discourse.nodered.org/u/Gunner)
#### Post date: [11 August 2021 21:02 UTC](https://discourse.nodered.org/t/symbol-in-ui-text-node-label/49631/2 "2021-08-11T21:02:18Z")

</div>

Yes, using key codes to display special characters.

[https://tools.oratory.com/altcodes.html](https://tools.oratory.com/altcodes.html)

The one you are looking for is Alt 241

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/4/44f570c02f6f54f221f8c816e33799703aa957b5.png)

---

<div class="post-metadata">

### Author: ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)
#### Post date: [11 August 2021 21:04 UTC](https://discourse.nodered.org/t/symbol-in-ui-text-node-label/49631/3 "2021-08-11T21:04:53Z")

</div>

Depends how you fill the ui\_txt label.  
In a function node you can do simpel this

```auto
msg.payload = "Volts 3.2 - 3.4 ± 21-23"
return msg;

```

Example:

```auto
[{"id":"8769ab57.dea6","type":"inject","z":"4c67c901.6c7988","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":60,"wires":[["a903082.f28d1f8"]]},{"id":"a903082.f28d1f8","type":"function","z":"4c67c901.6c7988","name":"","func":"msg.payload = \"Volts 3.2 - 3.4 ± 21-23\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":350,"y":60,"wires":[["af83070c.73a26"]]},{"id":"af83070c.73a26","type":"ui_text","z":"4c67c901.6c7988","group":"b1015362.70285","order":7,"width":0,"height":0,"name":"","label":"text","format":"{{msg.payload}}","layout":"row-spread","x":560,"y":60,"wires":[]},{"id":"b1015362.70285","type":"ui_group","name":"TEstGroep","tab":"cb1110e8.87fd1","order":1,"disp":true,"width":"6","collapse":false},{"id":"cb1110e8.87fd1","type":"ui_tab","name":"Tab 1","icon":"dashboard","order":1}]

```

![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/b/fb83001b5e604c11fccab7656ec1e6394769d0e2.png)

edit: You can also use the numeric code, for this or other [Math or special symbol](http://www.javascripter.net/faq/mathsymbols.htm).

```auto
msg.payload = "Volts 3.2 - 3.4 "+ '&#177;' + " 21-23"
return msg;

```

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [11 August 2021 21:13 UTC](https://discourse.nodered.org/t/symbol-in-ui-text-node-label/49631/4 "2021-08-11T21:13:52Z")

</div>

Sure you can just paste it in the label field, or save it as variable and use mustache syntax.  
e.g.

```auto
[{"id":"e9366ca3.d23888","type":"inject","z":"c74669a0.6a34f8","name":"","props":[{"p":"payload"},{"p":"label","v":"Volts 3.2 - 3.4 ± 21 - 23","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"200","payloadType":"str","x":260,"y":4440,"wires":[["93620258.0d0c","1f14adea.165232"]]},{"id":"1f14adea.165232","type":"ui_text","z":"c74669a0.6a34f8","group":"8b5cde76.edd58","order":14,"width":0,"height":0,"name":"","label":"{{msg.label}}","format":"{{msg.payload}}","layout":"col-center","x":620,"y":4480,"wires":[]},{"id":"8b5cde76.edd58","type":"ui_group","name":"","tab":"8f03e639.85956","order":1,"disp":true,"width":"12","collapse":false},{"id":"8f03e639.85956","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

### Author: ![RaptorUK](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/raptoruk/32/46988_2.png) [@RaptorUK](https://discourse.nodered.org/u/RaptorUK)
#### Post date: [12 August 2021 07:23 UTC](https://discourse.nodered.org/t/symbol-in-ui-text-node-label/49631/5 "2021-08-12T07:23:54Z")

</div>

> [@Gunner](#):
>
> The one you are looking for is Alt 241

Alt + 241 changes tab in Chrome . . . isn't Alt + number specifically for use with a numeric keypad on a keyboard ? I'm on a laptop and remoting into my Raspberry PI running Node Red, probably should have mentioned that in my post.

---

<div class="post-metadata">

### Author: ![RaptorUK](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/raptoruk/32/46988_2.png) [@RaptorUK](https://discourse.nodered.org/u/RaptorUK)
#### Post date: [12 August 2021 07:27 UTC](https://discourse.nodered.org/t/symbol-in-ui-text-node-label/49631/6 "2021-08-12T07:27:31Z")

</div>

> [@edje11](#):
>
> Depends how you fill the ui\_txt label.  
> In a function node you can do simpel this

I simply wanted to enter the label field manually in the node.

This doesn't work for me, I imported your flow and see this in the function node . . .

msg.payload = "Volts 3.2 - 3.4 � 21-23"

I'm on a Raspberry PI running Node Red, probably should have mentioned that in my post.

---

<div class="post-metadata">

### Author: ![RaptorUK](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/raptoruk/32/46988_2.png) [@RaptorUK](https://discourse.nodered.org/u/RaptorUK)
#### Post date: [12 August 2021 07:31 UTC](https://discourse.nodered.org/t/symbol-in-ui-text-node-label/49631/7 "2021-08-12T07:31:53Z")

</div>

> [@E1cid](#):
>
> Sure you can just paste it in the label field, or save it as variable and use mustache syntax.

Sorry, this doesn't work either . . .  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/4/c4afa622e9613aaa070e15a5cdcc7f66e43b945c.png)

---

<div class="post-metadata">

### Author: ![Gunner](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gunner/32/43582_2.png) [@Gunner](https://discourse.nodered.org/u/Gunner)
#### Post date: [12 August 2021 07:47 UTC](https://discourse.nodered.org/t/symbol-in-ui-text-node-label/49631/8 "2021-08-12T07:47:34Z")

</div>

> [@RaptorUK](#):
>
> Alt + 241 changes tab in Chrome

Doesn't do that for me

> [@RaptorUK](#):
>
> isn't Alt + number specifically for use with a numeric keypad on a keyboard ?

Possibly.. I always use the numerical keypad, so don't know otherwise, but may test it one day.  
**EDIT** - Using top row numbers does nothing. Number pad always works for that and other Symbols I tend to use, like degrees ° (ALT 248 or ALT 0176)

> [@RaptorUK](#):
>
> I'm on a laptop and remoting into my Raspberry PI running Node Red

Same here.

And it works just fine so far...

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/3/f3d8a816fe77d546baf97622effb3b9562fbbe8a.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/d/cd0664529a5de724cb9617a9c61aeff5e2e2645e.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/d/7d94e6af298c93129834f6a1f3061758579da0fc.png)

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [12 August 2021 07:54 UTC](https://discourse.nodered.org/t/symbol-in-ui-text-node-label/49631/9 "2021-08-12T07:54:05Z")

</div>

Sure it works, if it doesn't for you, it is probably a browser/web font issue.  
works on firefox and chrome for me

 ![Screenshot_20210812-085138](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/7/3731af993b23c848e197d60fe30be5f74ca5357a.png)

---

<div class="post-metadata">

### Author: ![RaptorUK](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/raptoruk/32/46988_2.png) [@RaptorUK](https://discourse.nodered.org/u/RaptorUK)
#### Post date: [12 August 2021 08:01 UTC](https://discourse.nodered.org/t/symbol-in-ui-text-node-label/49631/10 "2021-08-12T08:01:37Z")

</div>

> [@Gunner](#):
>
> > [@RaptorUK](#):
> >
> > I'm on a laptop and remoting into my Raspberry PI running Node Red
> 
> Same here.

How weird . . . on the pi I can get this in the text editor, Volts 3.2-3.4 ± 21 - 23 but if I copy and paste that into the node label I get this:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/f/bfb515a28e29d75e8e08032d024bc32084236d15.png)

Maybe its a Node Red version thing, I'm on 1.3.5 on a reasonably recent OS build on the pi

---

<div class="post-metadata">

### Author: ![Gunner](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gunner/32/43582_2.png) [@Gunner](https://discourse.nodered.org/u/Gunner)
#### Post date: [12 August 2021 08:06 UTC](https://discourse.nodered.org/t/symbol-in-ui-text-node-label/49631/11 "2021-08-12T08:06:18Z")

</div>

> [@RaptorUK](#):
>
> I get this:

\u00b1 is the UNICODE for the same ± symbol

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/f/2fbd3230b18613f24bd0929b8a09fe4fb2e40cf0.png)

> **[Unicode characters table](https://www.rapidtables.com/code/text/unicode-characters.html)**
>
> Unicode character symbols table with escape sequences & HTML codes.

Gets confusing, what with all these differing ways of displaying funny characters and shapes 😛 Some work better with the keyboard and others better programmatically.

---

<div class="post-metadata">

### Author: ![RaptorUK](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/raptoruk/32/46988_2.png) [@RaptorUK](https://discourse.nodered.org/u/RaptorUK)
#### Post date: [12 August 2021 08:13 UTC](https://discourse.nodered.org/t/symbol-in-ui-text-node-label/49631/12 "2021-08-12T08:13:24Z")

</div>

> [@Gunner](#):
>
> \u00b1 is the UNICODE for the same ± symbol

Yup, I realised that but still don't understand why I can enter the correct character.

Got it working now though using the following entered directly into the node label field: Volts 3.2-3.4 &#177 21 - 23

Thanks to all for the help 👍

---

<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: [26 August 2021 08:14 UTC](https://discourse.nodered.org/t/symbol-in-ui-text-node-label/49631/13 "2021-08-26T08:14:07Z")

</div>

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