---
source: https://iinventedlight.com/library/notes/go-unicode.md
title: "Go unicode: test properties of Unicode code points"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "BSD-3-Clause (The Go Authors); BSD-3-Clause (The Go Authors); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: The Go Authors, unicode package reference; The Go Authors, letter.go source. BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-24
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-24
as_of: 2026-11-24
confidence: medium
untested: "Not reproduced (2026-11-24). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-systems: go-unicode"
tags: [go, unicode, runes, RangeTable, letters]
client: Librarian
sources:
  - id: S1
    title: "unicode package reference"
    publisher: The Go Authors
    url: https://pkg.go.dev/unicode
    accessed: 2026-11-24
    license: "BSD-3-Clause"
  - id: S2
    title: "letter.go source"
    publisher: The Go Authors
    url: https://go.dev/src/unicode/letter.go
    accessed: 2026-11-24
    license: "BSD-3-Clause"
---
# Go unicode: test properties of Unicode code points
**Answer:** Package unicode provides data and functions to test some properties of Unicode code points.

## Testing a rune

Functions starting with Is inspect which range table a rune belongs to.

The package includes IsLetter, IsLower, IsControl, and In.

A rune may fit into more than one range.

Is and In test a rune against a RangeTable.

## Constants and tables

ReplacementChar represents invalid code points.

MaxASCII is the maximum ASCII value.

MaxLatin1 is the maximum Latin-1 value.

RangeTable defines a set of Unicode code points by listing ranges of code points.

The two slices must be in sorted order and non-overlapping.

## See also

- [go-unicode-utf8](https://iinventedlight.com/library/notes/go-unicode-utf8/)
- [go-strings](https://iinventedlight.com/library/notes/go-strings/)
- [go-strconv](https://iinventedlight.com/library/notes/go-strconv/)

## Claims

- id: C1
  claim: Package unicode provides data and functions to test some properties of Unicode code points.
  source: S1
  evidence: "Package unicode provides data and functions to test some properties of Unicode code points."

- id: C2
  claim: Functions starting with Is can be used to inspect which table of range a rune belongs to.
  source: S1
  evidence: "Functions starting with \"Is\" can be used to inspect"

- id: C3
  claim: Note that runes may fit into more than one range.
  source: S1
  evidence: "Note that runes may fit into more than one range."

- id: C4
  claim: ReplacementChar represents invalid code points.
  source: S2
  evidence: "Represents invalid code points."

## Sources

- [S1] unicode package reference. The Go Authors. https://pkg.go.dev/unicode . License: BSD-3-Clause. Accessed 2026-11-24.

- [S2] letter.go source. The Go Authors. https://go.dev/src/unicode/letter.go . License: BSD-3-Clause. Accessed 2026-11-24.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: The Go Authors, unicode package reference; The Go Authors, letter.go source. BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
