go/cp437-to-utf8.go @ 3709361eb09c

More
author Steve Losh <steve@stevelosh.com>
date Wed, 26 Oct 2022 16:01:18 -0400
parents dabb5f1ef3b2
children (none)
package main

import (
	"io"
	"os"

	"golang.org/x/text/encoding/charmap"
	"golang.org/x/text/transform"
)

func main() {
	r := transform.NewReader(os.Stdin, charmap.CodePage437.NewDecoder())
	io.Copy(os.Stdout, r)
}