Homey Community Forum

Superscript and special characters

In app.json you can specify custom capabilities with the unit defined in unit. This is fine for normal roman characters and digits, but how can I specify special characters such as μ or a sub- or superscript? Do I use Unicode UTF-16 or something? What would the syntax be?

The JSON standard supports UTF-8, UTF-16 and UTF-32. However, the default is UTF-8 and it is highly recommended to use that character encoding for your JSON documents.

  "units" : { "en" : "μA" }

Great, thanks.
Based on that I tested a bit more and for other characters such as superscripts I can use the UTF-16 code, e.g. for a cubic meter I can type "units": "m\u00b3" which renders well in the Homey UI.