Contact

CHAR Function (OpenOffice Calc)

Text Intermediate OpenOffice Calc

Create characters with Apache OpenOffice CHAR. Verify ASCII codes, spaces and line feeds while distinguishing system byte encoding from Unicode code points.

Verification status: Eight ordinary ASCII character formulas were recalculated in Apache OpenOffice 4.1.16 on Linux x86-64, Build 9816, using generated ODF. Saved identities, typed results and controls were checked. Locale was English (USA), default currency USD; other locales were not tested. How formula examples are checked

Quick answer: =CHAR(65) returned the string “A”. =CHAR(48) returned the string “0”, rather than numeric zero.

Availability and version history

  • Introduced: First release not established; documented by OpenOffice.org 3.3.
  • Supported in: Apache OpenOffice 4.1.16; no final supported release is established.
  • Scope: English desktop Calc with semicolon-separated formulas. The observed locale was English (USA), default currency USD.
  • Checked: October 14, 2026. Eight ordinary examples were recalculated in 4.1.16 on Linux x86-64, Build 9816. Saved types, strings or numeric values, and both controls were checked.

What CHAR returns

CHAR converts a byte-sized number through the application’s system text encoding. It is not an unrestricted Unicode-code-point function. The ordinary ASCII examples below are unambiguous within the tested environment. Release implementation.

Syntax and arguments

=CHAR(Number)
  • Number: code to convert.

The inspected source accepts values from 0 up to but not including 256, then casts to a byte before conversion. The tested inputs are exact ASCII integers; neither arbitrary Unicode values nor fractional conversion was exercised.

Reproducible ASCII examples

All eight formulas were recalculated. Stored string values and ODF text markup were decoded exactly, including the space and line feed, which can look empty in a displayed cell. Code-point labels describe those saved characters; they do not change CHAR into a general Unicode function.

Formula Independent character reference Saved string code point
=CHAR(65) U+0041 A U+0041
=CHAR(66) U+0042 B U+0042
=CHAR(90) U+005A Z U+005A
=CHAR(97) U+0061 a U+0061
=CHAR(122) U+007A z U+007A
=CHAR(48) U+0030 0 U+0030
=CHAR(32) U+0020 SPACE U+0020
=CHAR(10) U+000A LINE FEED U+000A

Practical worksheet

CHAR(65) gives the capital letter A, while CHAR(97) gives lowercase a. CHAR(48) gives the character “0”, not numeric zero. The saved value type is a string even when its appearance resembles a digit.

CHAR(32) produces one space. A space can be hard to see in a cell, so the table identifies it by U+0020 rather than displaying an apparently empty answer. CHAR(10) produces a line-feed character; its stored code point is inspected separately from how a particular cell displays or wraps it.

Advanced interpretation and checks

A useful string construction is "Item"&CHAR(32)&"A", whose independently expected text is “Item A”. Similarly, "A"&CHAR(10)&"B" contains three code points, with a line feed between the letters. The visual rendering of that line break depends on the cell’s layout settings.

Do not infer a universal mapping for codes above the ASCII range from these examples. The source explicitly calls the system-encoding conversion routine. A code that denotes one character on a particular legacy encoding can denote something else, or be unsuitable, under a different environment.

Boundaries and troubleshooting

The source rejects a negative value or a value at least 256; those boundaries were source-reviewed rather than executed here. The accepted zero-code path is also outside the eight examples and should not be mistaken for an ordinary visible character.

For Unicode work, use a function whose documented contract is Unicode rather than assuming CHAR accepts any code point. Keep text and numeric results distinct: changing a cell’s number format cannot turn the string “0” into a verified numeric input. Other locales, system encodings, fonts and workbook exports were not tested by this ASCII set.

Official evidence and checking scope

The generated ODF was opened in the native application, hard-recalculated and saved separately. Its informational “Not all attributes could be read” load warning was retained. Both stale and uncached SUM controls refreshed correctly. The original XLSX was not executed, and this generated-ODF test does not establish manual entry or execution in another release or locale.