Contact

UNICHAR Function (Gnumeric)

Text Beginner Gnumeric

Learn the UNICHAR function in Gnumeric: Converts a code number into a Unicode character or letter.

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

Validation limits: Examples were independently checked against character encodings and the checksum-verified official Gnumeric 1.12.62 source. No native Gnumeric execution or screenshots were performed.

What UNICHAR does

UNICHAR converts a Unicode code point expressed as a number into its corresponding character. The official Gnumeric implementation takes a numeric argument, checks whether its integer code point is a valid Unicode character, and builds its UTF-8 representation. This differs from CHAR, whose documented character set is Windows-1252 (CP1252), not arbitrary Unicode. Evidence: Gnumeric 1.12.62 tagged help_unichar, gnumeric_unichar, and help_char source.

This is useful when a data source supplies code-point numbers instead of the characters themselves, for instance converting 960 into π on a worksheet. The resulting glyph depends on the installed font and renderer; a missing-looking symbol is not necessarily a calculation failure.

Syntax and arguments

=UNICHAR(n)
Argument Required? Gnumeric-specific interpretation
n Yes A numeric Unicode code-point value. Enter a nonnegative whole number representing a valid Unicode scalar value.

There is one mandatory argument and no documented default. The implementation is registered under unichar with a one-numeric-argument signature ("f"). Ordinary Unicode scalar values range from U+0000 through U+10FFFF, excluding surrogate code points U+D800–U+DFFF; validity is checked using GLib’s g_unichar_validate. Noninteger coercion is not a recommended contract: the implementation converts its numeric value to an integer for validation, and other spreadsheet software may treat fractional values differently. Evidence: Gnumeric tagged function registration and implementation; GLib validation specification.

Version and locale: The analysis targets the upstream Gnumeric 1.12.62 source, released in September 2026. Availability in a specific packaged desktop build has not been independently verified. The examples use English function names and decimal integer constants. Because UNICHAR takes only one parameter, none of the direct examples depends on comma versus semicolon argument separators; a localized environment may display or require different formula conventions. Evidence: Gnumeric 1.12 official source series; function catalogue.

Example 1 — Convert Unicode numbers into readable symbols

Enter these numeric code points in A2:A6. In B2 enter =UNICHAR(A2) and fill downward. The output column contains expected characters, not recorded Gnumeric results.

Cell Value in column A Formula in column B Expected result Meaning
A2/B2 65 =UNICHAR(A2) A Latin capital A
A3/B3 960 =UNICHAR(A3) π Greek small pi
A4/B4 8364 =UNICHAR(A4) € Euro sign
A5/B5 9733 =UNICHAR(A5) ★ Black star
A6/B6 128512 =UNICHAR(A6) 😀 Grinning face

Independent calculation: Python’s standard-library chr returns these characters for the listed Unicode scalar values. Documentation check: The tagged Gnumeric gnumeric_unichar implementation encodes valid values to UTF-8; its official help includes =UNICHAR(65) and =UNICHAR(960). Neither is a native application execution of this worksheet. Evidence: tagged Gnumeric source.

Example 2 — Build a Unicode label from an imported code point

Suppose a character mapping CSV contains a description in column A and its decimal Unicode scalar value in column B:

A (description) B (code point) C (=UNICHAR(B2) filled down) Expected C
Pi 960 =UNICHAR(B2) π
Euro 8364 =UNICHAR(B3) €
Star 9733 =UNICHAR(B4) ★

Keep code points numeric rather than treating strings such as U+03C0 as decimal numbers. To convert U+03C0, first parse its hexadecimal digits with a separately documented conversion workflow, then pass the decimal code point (960) to UNICHAR. No assumption about text-to-number coercion is required for the example above.

Advanced example — Verify a round-trip conversion

For a valid nonzero Unicode scalar number 960 stored in A2, compare:

=UNICODE(UNICHAR(A2))

Expected numeric result: 960. UNICHAR first generates Ï€; UNICODE then returns the first character’s code point. This is a documentation/source-based expected result, independently corroborated by ord(chr(960)), not a completed Gnumeric integration test. The edge case U+0000 is intentionally excluded from this round-trip statement because embedded NUL text handling was not tested. Evidence: tagged gnumeric_unichar and gnumeric_unicode source.

For a visual demonstration, compare =UNICHAR(960) with =CHAR(960): the tagged source documents CHAR as accepting code numbers 1–255 and returning a CP1252 character, whereas UNICHAR represents Unicode. Expected: UNICHAR(960) produces π; CHAR(960) returns #VALUE! according to the tagged implementation. Evidence: tagged gnumeric_char and gnumeric_unichar.

Errors, limits, and troubleshooting

Input Expected interpretation (not native-tested) Recommended action
=UNICHAR(-1) #VALUE! from invalid negative value Supply a valid nonnegative Unicode scalar number.
=UNICHAR(55296) #VALUE! because U+D800 is a surrogate, not a Unicode scalar value Exclude U+D800–U+DFFF.
=UNICHAR(1114112) #VALUE! because U+110000 is above the Unicode range Keep code points at or below U+10FFFF and exclude surrogates.
A valid value yields a square/blank-looking glyph Rendering/font may not support the glyph Use an appropriate Unicode-capable font; inspect actual cell contents.
Input has a fractional portion, such as 960.5 Source performs numeric-to-integer conversion, but fractional behavior is not presented as a portable contract Use whole-number code points.
=UNICHAR(0) Not asserted here; the code-point validator accepts zero, but string/NUL presentation requires native testing Do not use U+0000 as an ordinary visible symbol or assume Excel’s error behavior.

The expected #VALUE! classifications above are derived from the tagged Gnumeric 1.12.62 implementation, which explicitly returns value_new_error_VALUE for invalid code points, and from GLib’s Unicode scalar validity rules. They were not observed in Gnumeric. Evidence: gnumeric_unichar; GLib code-point validator.

Other input types: Empty cells, errors passed through references, unusual numeric coercions, and workbook-specific imported text were not natively tested. Use the valid numeric examples as the tested-by-independent-calculation baseline rather than inventing application behavior for these cases.

Gnumeric’s tagged function help calls UNICHAR Excel-compatible, but this is a documentation-level compatibility statement, not a guarantee of identical treatment of every invalid value, control character, Unicode normalization sequence, or font. Do not infer Gnumeric edge cases from Excel or LibreOffice alone. The upstream public catalogue also classifies the registered function as a complete implementation with basic project tests; that status does not validate these examples in the local runtime. Evidence: tagged function help and registry; Gnumeric catalogue.

  • UNICODE performs the reverse operation on the first character of a text string.
  • CHAR represents characters using the much smaller CP1252 code table.
  • CODE returns the CP1252 code for the first applicable character; it is not a general Unicode converter.

Primary source verification: The official Gnumeric 1.12.62 archive was verified against GNOME’s SHA-256 checksum, then plugins/fn-string/functions.c was inspected without compilation or execution.

Official references and verification record

Official software/version: Upstream Gnumeric 1.12.62 source. References accessed: 2026-10-12 UTC.

  1. Gnumeric tagged 1.12.62 string-function implementation — help_unichar, gnumeric_unichar, function registration. Supports syntax, parameter role, scalar validation, error path, implementation status, and documentation-level Excel compatibility.
  2. Gnumeric official function catalogue. Supports function registration and catalogue classification; not runtime execution.
  3. GNOME Gnumeric 1.12 source release directory. Supports the 1.12.62 release context.
  4. GLib g_unichar_validate documentation. Supports Unicode scalar validity and the important U+0000 qualification.

Validation: Official manual and checksum-verified release-source inspection; independent code-point, encoding and string calculations. Native Gnumeric execution, screenshots, locale/platform and workbook round-trip tests were not performed.