At one point or another, every developer gets stuck converting a pile of files from one character encoding to another. Go's native character set is UTF-8, and the core Go libraries don't come with tools for converting character sets. However, one of the Go extension libraries makes this easy.
The package you want is golang.org/x/text, which comes with a variety of tools for working with text. And the one we're most interested in is the encoding set of packages.
Decode to UTF-8, En...
Published on March 08, 2016 20:44