ASCII transliterations of Unicode text. Inspired by python-unidecode.
go get github.com/mozillazg/go-unidecode
Install CLI tool:
$ go install github.com/mozillazg/go-unidecode/cmd/unidecode@latest
$ unidecode 北京kožušček
Bei Jing kozuscek
API documentation can be found here: https://godoc.org/github.com/mozillazg/go-unidecode
package main
import (
"fmt"
"github.com/mozillazg/go-unidecode"
)
func main() {
s := "abc"
fmt.Println(unidecode.Unidecode(s))
// Output: abc
s = "北京"
fmt.Println(unidecode.Unidecode(s))
// Output: Bei Jing
s = "kožušček"
fmt.Println(unidecode.Unidecode(s))
// Output: kozuscek
}