A Go library for converting Unicode text to ASCII transliterations, inspired by python-unidecode.
go-unidecode is a Go library that converts Unicode text into ASCII transliterations. It transforms characters from various languages and scripts into reasonable ASCII representations, solving the problem of handling Unicode text in systems that only support ASCII. The library is directly inspired by the popular python-unidecode project.
Go developers working with international text who need to convert Unicode characters to ASCII for compatibility with legacy systems, search indexing, or URL slug generation.
Developers choose go-unidecode because it provides a reliable, battle-tested approach to Unicode transliteration based on the established python-unidecode algorithm, with a simple API and included CLI tool for convenience.
ASCII transliterations of Unicode text.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides a straightforward Unidecode() function that can be easily called in Go code, as demonstrated in the usage example with outputs for '北京' and 'kožušček'.
Includes a CLI tool for quick text conversion from the terminal, shown in the installation section with the command 'unidecode 北京kožušček' outputting 'Bei Jing kozuscek'.
Handles characters from various scripts including Chinese and European languages with diacritics, making it suitable for international text conversion based on the python-unidecode inspiration.
Follows the same transliteration logic as the established python-unidecode library, ensuring reliability and consistency for developers familiar with that ecosystem.
Prioritizes practical over perfect transliteration, admitting to 'good enough' ASCII representations that may lack linguistic precision for complex scripts or formal use cases.
No built-in support for custom mapping tables or advanced transliteration rules, restricting flexibility for projects needing tailored conversions beyond the default logic.
The README lacks performance benchmarks; transliterating large text volumes could introduce latency, especially for scripts with extensive character mappings.