ArticleslgStudy

computer science

Character (computing)

Character (computing) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Character (computing) rather than just read about it. In short: In computing and telecommunications, a character is the encoded representation of a natural language character (including letter, numeral and punctuation), whitespace (space or tab), or a control character (controls computer hardware that consumes character-based data). A sequence of characters is called a string.

Character (computing) — main illustration
Character (computing) — illustration

Key takeaways

  • Character (computing) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Character (computing) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Character (computing) from memory before moving on to harder problems.

Reference excerpt

In computing and telecommunications, a character is the encoded representation of a natural language character (including letter, numeral and punctuation), whitespace (space or tab), or a control character (controls computer hardware that consumes character-based data). A sequence of characters is called a string. Some character encoding systems represent each character using a fixed number of bits whereas other systems use varying sizes. Various fixed-length sizes were used for now obsolete systems such as the six-bit character code, the five-bit Baudot code and even 4-bit systems (with only 16 possible values). The more modern ASCII system uses the 8-bit byte for each character. Today, the Unicode-based UTF-8 encoding uses a varying number of byte-sized code units to define a code point which combine to encode a character.

Terminology

Character In general, a character is a symbol (such as a letter or number) that represents information, and in the context of computing is a representation of such a symbol that may be accepted by a computer. A character implies an encoding of information, often as defined by a standard such as ANSI or Unicode.

Character set A character set identifies a repertoire of characters that are each mapped to a unique numeric value.

Glyph Glyph describes a particular visual appearance of a character. Many computer fonts consist of glyphs that are indexed by the numerical code of the corresponding character. With the advent and widespread acceptance of Unicode and bit-agnostic coded character sets, a character is increasingly being seen as a unit of information, independent of any particular visual manifestation. The ISO/IEC 10646 (Unicode) International Standard defines character, or abstract character as "a member of a set of elements used for the organization, control, or representation of data". Unicode's definition supplements this with explanatory notes that encourage the reader to differentiate between characters, graphemes, and glyphs, among other things. Such differentiation is an instance of the wider theme of the separation of presentation and content. For example, the Hebrew letter aleph ("א") is often used by mathematicians to denote certain kinds of infinity (ℵ), but it is also used in ordinary Hebrew text. In Unicode, these two uses are considered different characters, and have two different Unicode numerical identifiers ("code points"), though they may be rendered identically. Conversely, the Chinese logogram for water ("水") may have a slightly different appearance in Japanese texts than it does in Chinese texts, and local typefaces may reflect this. But nonetheless in Unicode they are considered the same character, and share the same code point. The Unicode standard differentiates between these abstract characters and coded characters or encoded characters that have been paired with numeric codes that facilitate their representation in computers.

Combining character The combining character is addressed by Unicode which allocates a code point to each of:

'i ' (U+0069), the combining diaeresis (U+0308), and 'ï' (U+00EF). This makes it possible to code the middle character of the word 'naïve' either as a single character 'ï' or as a combination of the character 'i ' with the combining diaeresis: (U+0069 LATIN SMALL LETTER I + U+0308 COMBINING DIAERESIS); this is also rendered as 'ï '.

char

In C, char (short for character) is a data type with size one byte, but unlike the de facto size of byte as 8 bits, this use of byte is less specific. Byte is defined to be large enough to contain any member of the "basic execution character set". The number of bits used by a compiler is accessible via the CHAR_BIT macro. By far the most common size is 8 bits, and POSIX requires it to be 8 bits. In modern C standards, char is required to hold UTF-8 code units which requires a minimum size of 8 bits. Since a Unicode code point may require as many as 21 bits. the char type is generally not large enough for every character. Nonetheless, the char type is well-suited for the UTF-8 encoding where each code point requires 1 to 4 bytes. The fact that a character was historically stored in a single byte has led to the terms "char" and "character" being used interchangeably and this leads to confusion today when multibyte encodings such as UTF-8 are used. Modern POSIX documentation attempts to fix this by defining "character" as a sequence of one or more bytes representing a single graphic symbol or control code, and uses "byte" when referring to char data. However it still contains errors such as defining an array of char as a character array (rather than a byte array). Unicode can be stored in strings of code units that are larger than char called wide characters. The original C type was called wchar_t. Due to some platforms defining wchar_t as 16 bits and others defining it as 32 bits, current versions provide unambiguous char16_t and char32_t. Even then the objects being stored might not be characters, for instance the variable-length UTF-16 is often stored in arrays of char16_t. Other languages also have a char type. Many, including C++, use 8-bit bytes like C. Others, such as Java, use 2-byte, wide storage to more directly accommodate UTF-16.

See also Character (symbol) – Character as a semiotic sign or symbol Character literal – Type of literal in programming Combining character – Non-spacing character that modifies another character Fill character Homoglyph – Different glyphs which are visually similar Universal Character Set characters – Complete list of the characters available on most computers

References

External links Characters: A Brief Introduction by The Linux Information Project (LINFO) ISO/IEC TR 15285:1998 summarizes the ISO/IEC's character model, focusing on terminology definitions and differentiating between characters and glyphs

Illustrations

Character (computing): A string of seven characters
A string of seven characters

Worked examples

Example 1 — a first encounter with Character (computing)

Start with the simplest possible case. Write down what Character (computing) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Character (computing) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Character (computing) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Character (computing)

In research
Character (computing) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Character (computing) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Character (computing) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Character encoding, Data types, Digital typography, so understanding it makes those chapters shorter.
In everyday life
Look for Character (computing) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Character (computing)” →

How to study Character (computing) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Character (computing) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Character (computing) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Character (computing) in simple terms?

In computing and telecommunications, a character is the encoded representation of a natural language character (including letter, numeral and punctuation), whitespace (space or tab), or a control character (controls computer hardware that consumes character-based data). A sequence of characters is…

Why does Character (computing) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Character (computing)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Character (computing).

Tags

  • Character encoding
  • Data types
  • Digital typography
  • Primitive types

Keep exploring