Documentation ¶
Overview ¶
Package encoding provides a replacement encoder and decoder for use with mime.CharsetEncoder and mime.CharsetDecoder. This loads all the encodings provided with:
* golang.org/x/text/encoding/ianaindex
This will make the size of your compiled binaries considerably larger. But it will also give your code the ability to encode and decode pretty much any character set it might encounter in the wild wild world of email.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CharsetDecoder ¶
CharsetDecoder provides a replacement decoder for mime.CharsetDecoder, which can decode a wide range of rare and unusual character sets.
func CharsetEncoder ¶
CharsetEncoder provides a replacement encoder for mime.CharsetEncoder, which can encode a wide range of rare and unusual character sets.
func GenerateBoundary ¶
func GenerateBoundary() string
GenerateBoundary will generate a random MIME boundary that is probably unique in most circumstances.
func GenerateSafeBoundary ¶
GenerateSafeBoundary will generate a random MIME boundary that is guaranteed to be safe with the given corpus of data. Use this when you want to generate a boundary for a known set of parts:
boundary := encoding.GenerateSafeBoundary(strings.Join("", parts))
using this is likely to be total overkill, but in case you're paranoid.
Types ¶
This section is empty.