mirror of
https://github.com/mjl-/mox.git
synced 2024-12-29 18:03:48 +03:00
01adad62b2
message.Part now has a ReaderUTF8OrBinary() along with the existing Reader(). the new function returns a reader of decoded content. we now use it in a few places, including search. we only support the charsets in golang.org/x/text/encoding/ianaindex. search has also been changed to not read the entire message in memory. instead, we make one 8k buffer for reading and search in that, and we keep the buffer around for all messages. saves quite some allocations when searching large mailboxes.
12 lines
342 B
Go
12 lines
342 B
Go
// Copyright 2015 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package simplifiedchinese
|
|
|
|
import (
|
|
"golang.org/x/text/encoding"
|
|
)
|
|
|
|
// All is a list of all defined encodings in this package.
|
|
var All = []encoding.Encoding{GB18030, GBK, HZGB2312}
|