Update vendor/

This commit is contained in:
2018-06-28 01:09:56 +01:00
parent 3e5ab5bb0a
commit 21c6e571d8
108 changed files with 121110 additions and 1144 deletions

View File

@@ -0,0 +1,22 @@
package charset
import (
"mime"
)
var wordDecoder = &mime.WordDecoder{CharsetReader: Reader}
// DecodeHeader decodes an internationalized header field. If it fails, it
// returns the input string and the error.
func DecodeHeader(s string) (string, error) {
dec, err := wordDecoder.DecodeHeader(s)
if err != nil {
return s, err
}
return dec, nil
}
// EncodeHeader encodes an internationalized header field.
func EncodeHeader(s string) string {
return mime.QEncoding.Encode("utf-8", s)
}