Contact

UNICODE Function (OpenOffice Calc)

Text Intermediate OpenOffice Calc

Find the Unicode number of the first character in text with Apache OpenOffice Calc UNICODE, including practical audit formulas and limits.

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

Quick answer

UNICODE returns the numeric Unicode value of the first character in a text string in Apache OpenOffice Calc. For example:

=UNICODE("©")

Expected result: 169. Apache gives this exact example in its function-specific documentation [S2]. A longer string does not cause UNICODE to encode or add every character; it is a first-character inspection tool.

For a user-friendly worksheet, enter a text value in A2 and use =UNICODE(A2) in B2. This can help identify leading spaces, a suspicious first character in imported identifiers, or the code used by a label symbol.

Official syntax, parameter order and availability

Apache’s dedicated reference presents the single-parameter formula [S2]:

UNICODE("Text")

Here the quotes in the example indicate a text literal. In a worksheet, the formula may instead reference a cell:

=UNICODE(A2)
  • Text — required: a text string; its first character supplies the result. The cited documentation provides no optional additional arguments, no omitted-argument default, and no documented special treatment for empty text.
  • Result: a numeric Unicode value for the first character. The reference explicitly confirms UNICODE("©") → 169 [S2].
  • Multiple arguments: there are none in the official signature, so the UNICODE call needs no separator. Nested Calc formulas using IF or LEFT follow English Calc’s semicolon convention (;); other spreadsheet applications or locales may display different separators.
  • Version: the Apache Wiki article was last edited 2 February 2024. At research access on 2026-10-11, Apache’s official download page identified 4.1.16 as the latest release [S2, S6]. A documentation entry is not the same as testing that particular build.

The page does not establish behavior for an empty string, error values, badly encoded text or supplementary-plane characters. This guide does not claim version-specific error codes or Unicode scalar-value behavior beyond the documented examples and standard BMP mapping.

Reproducible text audit worksheet

In a new Calc sheet enter the following text in A2:A8. The quotes below clarify the examples; do not type the quote characters into the cells.

Cell Exact stored text Formula Expected numeric result Why
A2 A =UNICODE(A2) 65 Latin capital A
A3 ©2026 =UNICODE(A3) 169 First character only, copyright symbol
A4 €10 =UNICODE(A4) 8364 Euro sign U+20AC
A5 Ωmega =UNICODE(A5) 937 Greek capital omega
A6 Hello =UNICODE(A6) 72 First character H
A7 Pending =UNICODE(A7) 32 One actual leading ordinary space
A8 a =UNICODE(A8) 97 Lowercase a differs from A

Reproducibility note: A7 must begin with exactly one standard U+0020 space. If the editor strips leading spaces, paste a leading space into the cell explicitly and inspect its text. The expected numbers were checked independently with Unicode character mappings (ord(first_character)) and were not observed in Apache OpenOffice Calc. Only the copyright example is explicitly validated by the Apache page [S2].

This audit matters when two visually similar values behave differently as sort keys or when leading spaces break downstream joins. It does not replace normalization or text cleanup.

Advanced case 1 — detect a leading ordinary space

If A7 contains the text Pending with a leading regular space, enter:

=IF(UNICODE(A7)=32;"Leading ordinary space";"Starts with a different character")

Expected result: Leading ordinary space. If A7 contains Pending without the space, the expected result is Starts with a different character. The nested formula uses an Apache-documented first-character code and basic IF branching; it is independently reasoned, not native-tested. This test detects U+0020 at the beginning only; it does not assert that tabs, non-breaking spaces or other whitespace characters are equal to U+0020.

For operational use, consider a second column that shows the original text unchanged, so you can compare before/after cleanup without deleting data.

Advanced case 2 — rebuild a known single character

Enter the copyright symbol © in A2, then:

=UNICHAR(UNICODE(A2))

Expected result: ©. This is an independently checked round-trip of a known, single BMP character: Apache documents UNICODE("©") → 169 [S2] and UNICHAR(169) → © [S1]. It does not demonstrate that a complete longer string is rebuilt: if A2 contains ©2026, UNICODE is still described as inspecting its first character, and the expected reconstruction remains only ©.

Do not create a live related-page link until that page actually exists on the website.

Advanced case 3 — check the prefix of an imported field

If A3 contains ©2026, these should have equivalent expected numeric outcomes:

=UNICODE(A3)
=UNICODE(LEFT(A3;1))

Expected result: 169 for each, because LEFT extracts the first character before it is inspected. This example checks the composition of documented functions, not the support of arbitrary Unicode grapheme clusters or emoji.

Errors, limitations and troubleshooting

  • Unexpected 32: there may be an ordinary leading space; confirm what is actually stored in the first character rather than relying on a font’s appearance.
  • Unexpected code with accented text: composed characters and combining sequences can look alike while containing different code sequences. This function inspects the first character; it is not a Unicode-normalization algorithm. Do not promise a specific result for supplementary characters without native-version tests.
  • Empty cells or "" from another formula: the cited Apache article does not specify the exact output or error. Check natively before relying on an error-code example or claiming the two inputs behave identically.
  • Cell shows a number as text or displays an error: check that the input is a true text string and the formula has the correct function spelling, quotes or cell reference. If the build does not recognize UNICODE, inspect the Function Wizard and record its version before giving a definitive diagnosis.
  • Multi-character input mistaken for an encoding: UNICODE("Hello") describes only the code for H; it is not a list of code points, UTF-8 byte sequence or string hash.
  • Trying to identify a full user-perceived symbol: a glyph may consist of more than one code point; this function is not proof of a complete grapheme cluster or emoji encoding.
  • Pasting Excel or LibreOffice formulas: same-named functions do not establish identical handling of errors, supplementary characters, locale separators or numeric coercions in Apache OpenOffice.

UNICODE vs. CODE and compatibility

Apache documents CODE(text) as a code for the first character using the older system-dependent character mapping; values above 127 may depend on the installed character set [S4]. UNICODE is the Unicode-oriented alternative [S2, S4]. This is why CODE("A") can be compared with UNICODE("A") for the basic Latin sample (both expected 65), while generalizing that result to arbitrary non-ASCII characters or local encodings would be unsafe without native tests.

Excel and LibreOffice: they offer similarly named functions, but this guide neither equates all edge cases nor uses LibreOffice as proof of Apache support. No native application was executed.

The internal targets were checked against actual archived Markdown paths. Current live HTTP responses could not be confirmed; link checking must be repeated before relying on these cases.

No current-site page URL is asserted for it.

Official sources, claim-level checks and testing disclosure

Additional official reference: Apache OpenOffice implementation note for UNICHAR and UNICODE.

Validation note

The examples show expected results checked against Apache OpenOffice documentation and independent arithmetic, text mapping, or logical reasoning. They were not run in Apache OpenOffice Calc. Platform, locale, import, and unusual error cases are not certified.