chr(
chr(
VALUE
)

The chr( function converts a number into a single character of text, based on Unicode encoding.

Parameters

This function has one parameter:

value – The number corresponding to a unicode character.

Description

The chr( function converts a number between 0 and 65,535 based on Unicode encoding. For numbers from 0 to 127, Unicode encoding is the same as ASCII encoding.

    chr(65) ☞ A
    chr(97) ☞ a
    chr(10775) ☞ ⨗
    chr(10941) ☞ ⪽
    chr(8364) ☞ €

Notice that the character values listed on the unicode.org web site are in hexadecimal, not decimal. You’ll either need to convert these to decimal, or let Panorama do it for you. For example, the unicode symbol can be specified as a hex value a couple of ways:

    chr(0x20AC) ☞ €
    chr(hex("20AC")) ☞ €

You can even generate emoji’s using this function. (An easier method is to use the expandemojis( function.)

    chr(0x1f603) ☞ 😃

In addition to the official unicode web site listed above, you may find the web site Unicode Table useful. It displays all the Unicode characters on a single (very long) page, and displays both decimal and hex values. However, since this is not the official web site it may not always display the latest information.

See Also

- asc( -- converts the first character of a text string into a number from 0 to 65535 based on Unicode encoding.
- emojicheats( -- abbreviates any emojis with "emoji cheat" codes.
- expandemojis( -- expands any "emoji cheat" abbreviations into the actual emojis.

History

Version | Status | Notes
10.1.2 | Updated | Now supports emojis.
10.0 | Updated | Carried over from Panorama 6.0, but now allows full Unicode character set.