This site is being rebuilt and some pages are out of date. For current details, write to [email protected]. This notice goes away when the rebuild is done.

No analytics unless you allow it, no tracking. This site keeps in your browser the language you pick, the theme, its colour, which site you chose, the currency on the pricing page and that you closed this notice; signing in adds session cookies. The legal page has the details.

Sign in

Radar · Go · Archive · Week 9 · Feb 24 – Mar 2, 2025

unicode: add CategoryAliases, LC, Cn

Worth knowingstdlib

What changed
A new CategoryAliases map, and the LC and Cn range tables were added to the unicode package.
Production impact
The source does not say.
Try it
Use unicode.CategoryAliases["Letter"] in a small program.
Source
github.com/golang/go/issues/70780

Understand it, then run it

The Unicode package in Go keeps tables that describe what each character is. A long time ago the tables did not include a small map that tells the package which short names mean which long names. For example, the short name L means “Letter”, but the long name Letter was not linked. The change adds a map called CategoryAliases that maps names like Letter to the short form L. It also adds two new tables, LC for “Cased Letter” and Cn for “Unassigned”, so that the package can refer to them directly.

Written by gpt-oss-20b from the linked source · claims checked against the sources · archive, not individually reviewed