Help us shape the future of Go! Take the 2026 Go Developer Survey

widthgen

command
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Command widthgen turns Unicode's EastAsianWidth.txt into the table the line editor measures with.

It exists because this module has no dependencies of its own and a width table cannot be derived from the standard library: Go ships the general categories, so combining marks come free, but not East Asian Width. The table is generated into the repository rather than imported, and this is the program that made it.

Usage:

go run ./internal/widthgen -in EastAsianWidth.txt -out internal/eastasian/eastasianwidth.go

The input is https://www.unicode.org/Public/<version>/ucd/EastAsianWidth.txt and is not checked in: it is read once, and what the build uses is the Go file this writes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL