Contact

UNICHAR in Calligra Sheets: Create a Unicode Character and Understand BMP Limits

Text Intermediate Calligra Sheets

Generate characters from numeric codes in the Basic Multilingual Plane and avoid misleading supplementary-plane expectations.

Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Calligra Sheets. How formula examples are checked

Version scope: Official Calligra 26.08.2 source (KDE Gear release 2026-10-08); KDE stable KF6 English documentation, accessed 2026-10-11. The source registers UNICHAR separately; no explicit registered alias for this canonical function in the pinned text module. The function has one required argument and no documented optional defaults. Native execution was not performed.

Quick answer: =UNICHAR(65) is expected to return A; =UNICHAR(169) is expected to return ©. It is a numeric-character conversion function. Crucially, Calligra 26.08.2’s pinned implementation uses a 16-bit ushort and a single UTF-16 code unit, so do not assume it can construct every supplementary Unicode character like Excel’s Unicode-oriented implementation. Official documentation; source.

When UNICHAR is useful

Use it to put a known character from the Basic Multilingual Plane into a label, such as © (169), € (8364), or an ordinary letter. Unlike copying a literal symbol, a numeric code can be derived from a reference table. It is a distinct registered function from CHAR, but their visible results often agree for ordinary BMP characters; this does not mean they are documented aliases or interchangeable for all inputs.

Exact official syntax, types and defaults

=UNICHAR(code)
Argument Required? Official type Meaning Default
code Yes Integer Desired Unicode-related character code None

The version-pinned XML declares one integer argument, a text result and UNICHAR(65) → A. The registration is separate from CHAR. A single argument does not require separator punctuation; follow the English KDE manual’s semicolon syntax in nested multi-argument formulas and verify locale-specific settings locally.

Reproducible worksheet example

Enter 65, 66, 169, 233, 8364 and 32 into A2:A7. Type =UNICHAR(A2) in B2 and fill through B7. These are independently checked Unicode character mappings in the BMP and are expected results only.

Formula Expected result Verification method
=UNICHAR(65) A KDE official documentation
=UNICHAR(66) B Independent U+0042 mapping
=UNICHAR(169) © Independent U+00A9 mapping
=UNICHAR(233) é Independent U+00E9 mapping
=UNICHAR(8364) € Independent U+20AC mapping and single UTF-16 unit source implementation
=UNICHAR(32) a single space Independent U+0020 mapping, may look blank
=UNICHAR(0) source numeric error (errorNUM) Pinned C++ val > 0 branch; native display untested

Advanced: build identifiers and verify round trips

Suppose A2 stores a currency label in text and B2 stores numeric code 8364. In C2 enter:

=CONCATENATE(A2;" ";UNICHAR(B2))

With A2=Total and B2=8364, expected result is Total €. For a BMP value such as 169, =UNICODE(UNICHAR(169)) is expected to return 169 from the source implementations, because one UTF-16 unit also represents that scalar value. This is a restricted BMP test, not a guarantee for all Unicode.

A validation helper can reject clearly unsupported non-BMP numeric requests:

=IF(OR(A2<=0;A2>65535);"Outside supported source-code unit range";UNICHAR(A2))

This is a partial input safeguard, not a full Unicode-validity check. Unicode surrogate values U+D800–U+DFFF also do not represent standalone scalar characters; native runtime handling of those values has not been tested. OR and IF follow the documented Calligra semicolon syntax.

Important limitation: supplementary Unicode characters

Although the handbook describes a Unicode code point, the 26.08.2 C++ function first stores the converted integer in a 16-bit unsigned variable, checks it is greater than zero, then writes one UTF-16 unit. Unicode scalar U+1F600 (😀) is 128512, beyond 65535; the implementation does not construct the two UTF-16 units required for this character. Do not advertise UNICHAR(128512) as returning 😀 in this Calligra release. The exact resulting glyph or error has not been validated in Calligra; integer narrowing can produce surprising results instead.

Troubleshooting and cross-compatibility

If a character appears missing, check the font and whether it is a control or combining character before concluding the function failed. Zero produces an internal numeric error in the pinned implementation; do not copy Excel’s zero-error label as if verified for Calligra. If the input exceeds 65535, convert the actual character using a Unicode-capable tool rather than relying on this formula. Microsoft Excel’s UNICHAR documentation describes a Unicode number with different documented error handling; the Calligra 16-bit implementation is a specific compatibility risk, not a universal Unicode rule. LibreOffice Calc’s UNICHAR reference documents Unicode conversion, but specific edge behaviour should be tested separately rather than assumed identical.

Source scope, date and validation disclosure

Validation: Official documentation, immutable implementation and independent code-point calculations were checked. No native Calligra execution, installed-platform checks, glyph rendering or workbook interchange tests were performed.