X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/70c2c1100ac57b9444e71fd76b5c5f3205c71024..4a88189f30efac3cd86159b88c1a316a610e1523:/hotline/server.go diff --git a/hotline/server.go b/hotline/server.go index e4232b6..f4eef9b 100644 --- a/hotline/server.go +++ b/hotline/server.go @@ -8,6 +8,7 @@ import ( "fmt" "github.com/go-playground/validator/v10" "go.uber.org/zap" + "golang.org/x/text/encoding/charmap" "gopkg.in/yaml.v3" "io" "io/fs" @@ -29,6 +30,12 @@ type requestCtx struct { remoteAddr string } +// Converts bytes from Mac Roman encoding to UTF-8 +var txtDecoder = charmap.Macintosh.NewDecoder() + +// Converts bytes from UTF-8 to Mac Roman encoding +var txtEncoder = charmap.Macintosh.NewEncoder() + type Server struct { NetInterface string Port int