Documentation ¶
Overview ¶
Package quotedprintable implements quoted-printable encoding as specified by RFC 2045.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader is a quoted-printable decoder.
func NewReader ¶
NewReader returns a quoted-printable reader, decoding from r.
Example ¶
package main import ( "fmt" "io/ioutil" "mime/quotedprintable" "strings" ) func main() { for _, s := range []string{ `=48=65=6C=6C=6F=2C=20=47=6F=70=68=65=72=73=21`, `invalid escape: <b style="font-size: 200%">hello</b>`, "Hello, Gophers! This symbol will be unescaped: =3D and this will be written in =\r\none line.", } { b, err := ioutil.ReadAll(quotedprintable.NewReader(strings.NewReader(s))) fmt.Printf("%s %v\n", b, err) } }
Output: Hello, Gophers! <nil> invalid escape: <b style="font-size: 200%">hello</b> <nil> Hello, Gophers! This symbol will be unescaped: = and this will be written in one line. <nil>
type Writer ¶
type Writer struct { // Binary mode treats the writer's input as pure binary and processes end of // line bytes as binary data. Binary bool // contains filtered or unexported fields }
A Writer is a quoted-printable writer that implements io.WriteCloser.
func NewWriter ¶
NewWriter returns a new Writer that writes to w.
Example ¶
package main import ( "mime/quotedprintable" "os" ) func main() { w := quotedprintable.NewWriter(os.Stdout) w.Write([]byte("These symbols will be escaped: = \t")) w.Close() }
Output: These symbols will be escaped: =3D =09
Click to show internal directories.
Click to hide internal directories.