namefix

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package namefix repairs titles read from file and folder names.

Names on disk aren't always written the way a title is. Two kinds of difference show up in real libraries:

  • accents written as a letter plus a combining mark (NFD), as macOS and some SMB clients write them, against the single letter (NFC) everything else uses: "Amélie" looks the same either way but isn't the same bytes, so it doesn't match the title online;
  • garbled names (mojibake), where a tool read UTF-8 as Latin-1 or Windows-1252 and wrote it back: "Æon Flux" became "Ã\u0086on Flux" or "Æon Flux", "Léon" "Léon".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fold

func Fold(name string) string

Fold is a name for comparing: repaired, in lower case and without accents, so "Amélie", "Amélie" and "Amelie" are the same.

func Repair

func Repair(name string) string

Repair is a name as it was meant to be written: a garbled name turned back, and accents written the one way (NFC). A name that isn't garbled comes back as it is, but for how its accents are written.

Types

This section is empty.

Jump to

Keyboard shortcuts

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