Standard library / mime

mime.QEncoding

Select Q encoded-word representation, which differs from body quoted-printable in its treatment of spaces. Expected stdout: '=?UTF-8?q?caf=C3=A9_au?=\n'.

Formal Syntax & Structure

go syntaxgo
const QEncoding = WordEncoder('q')

Working Example

Example Snippetgo
package main
import (  "fmt"  "mime")
func main() { fmt.Println(mime.QEncoding.Encode("UTF-8", "café au")) }
func must[T any](v T, e error) T {  if e != nil {    panic(e)  }  return v}func check(e error) {  if e != nil {    panic(e)  }}
Go Reference