Handlebars char
Handlebars char: returns the Unicode character for a character code, optionally repeated.
Next
Runtime verified
Differs from official docs
Test scripts included
Returns the Unicode character for a character code, optionally repeated.
Syntax
{{char code [repeated]}}
Returns string.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
code |
number | Yes | Unicode character code in decimal. |
repeated |
integer | No | How many times to repeat the character. Defaults to 1. |
Example
Tested in a Marketing Cloud Next email on 2026-11-22:
{{char 65602 1}}breaks the email preview (HTTP 500). The documented result isB.{{char 65 3}}rendersAAA, as documented.
Show Next test script
Show calls that fail in Next (one email each)
Differs from official docs
- The reference says a code outside 0-65535 is wrapped into range with modulo 65536, and gives
{{char 65602 1}}returningBas its own example. In Marketing Cloud Next (tested 2026-11-22):{{char 65602 1}}let the email save and publish, but the preview then failed with HTTP 500 and no message. Codes inside the range work:{{char 65 3}}renderedAAA. Details
Marketing Cloud Next
Differs from the documentation
{{char 65 3}} gives AAA as documented. A code above 65535, {{char 65602 1}}, breaks the email preview (HTTP 500) instead of giving the documented B. Tested 2026-11-22 by rendering in a Marketing Cloud Next email.
See also
- AMPscript
Char— the AMPscript equivalent - Official reference