Skip to content
ASCII transliterations of Unicode text.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
table
unidecode
.gitignore first import Jul 7, 2016
.travis.yml fix ci Apr 5, 2019
CHANGELOG.md
LICENSE
Makefile go vet Apr 5, 2019
README.md update readme Apr 5, 2019
benchmark_test.go add benchmark_test.go Jul 10, 2016
doc.go
example_test.go
go.mod add go.mod file to identify as a module Apr 5, 2019
unidecode.go v0.1.1 Apr 5, 2019
unidecode_test.go

README.md

go-unidecode

Build Status Coverage Status Go Report Card GoDoc

ASCII transliterations of Unicode text. Inspired by python-unidecode.

Installation

go get -u github.com/mozillazg/go-unidecode

Install CLI tool:

$ go get -u github.com/mozillazg/go-unidecode/unidecode

$ unidecode 北京kožušček
Bei Jing kozuscek

Documentation

API documentation can be found here: https://godoc.org/github.com/mozillazg/go-unidecode

Usage

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
}
You can’t perform that action at this time.