← All notes

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

Claims

Sources

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.

License: CC-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.

Cite this

Permanent ID: iil:note:ktqd6tmg

iinventedlight. 2026. "Go unicode: test properties of Unicode code points." iinventedlight Library, iil:note:ktqd6tmg, version of 2026-11-24. https://iinventedlight.com/library/notes/go-unicode/. License: CC-BY-4.0.

@misc{iil_note_ktqd6tmg,
  author = {{iinventedlight}},
  title = {{Go unicode: test properties of Unicode code points}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-24},
  url = {https://iinventedlight.com/library/notes/go-unicode/},
  note = {Permanent ID iil:note:ktqd6tmg. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/go-unicode.md.