Moving to glide
Этот коммит содержится в:
15
vendor/github.com/mattermost/rsc/imap/Makefile
сгенерированный
поставляемый
Обычный файл
15
vendor/github.com/mattermost/rsc/imap/Makefile
сгенерированный
поставляемый
Обычный файл
@@ -0,0 +1,15 @@
|
||||
include $(GOROOT)/src/Make.inc
|
||||
|
||||
# TARG=code.google.com/p/rsc/imap
|
||||
|
||||
TARG=rsc.googlecode.com/hg/imap
|
||||
GOFILES=\
|
||||
decode.go\
|
||||
imap.go\
|
||||
mail.go\
|
||||
sx.go\
|
||||
tcs.go\
|
||||
|
||||
GCIMPORTS=-I$(GOPATH)/pkg/$(GOOS)_$(GOARCH)
|
||||
|
||||
include $(GOROOT)/src/Make.pkg
|
||||
227
vendor/github.com/mattermost/rsc/imap/decode.go
сгенерированный
поставляемый
Обычный файл
227
vendor/github.com/mattermost/rsc/imap/decode.go
сгенерированный
поставляемый
Обычный файл
@@ -0,0 +1,227 @@
|
||||
package imap
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/base64"
|
||||
"strings"
|
||||
"unicode"
|
||||
)
|
||||
|
||||
func decode2047chunk(s string) (conv []byte, rest string, ok bool) {
|
||||
// s is =?...
|
||||
// and should be =?charset?e?text?=
|
||||
j := strings.Index(s[2:], "?")
|
||||
if j < 0 {
|
||||
return
|
||||
}
|
||||
j += 2
|
||||
if j+2 >= len(s) || s[j+2] != '?' {
|
||||
return
|
||||
}
|
||||
k := strings.Index(s[j+3:], "?=")
|
||||
if k < 0 {
|
||||
return
|
||||
}
|
||||
k += j + 3
|
||||
|
||||
charset, enc, text, rest := s[2:j], s[j+1], s[j+3:k], s[k+2:]
|
||||
var encoding string
|
||||
switch enc {
|
||||
default:
|
||||
return
|
||||
case 'q', 'Q':
|
||||
encoding = "quoted-printable"
|
||||
case 'b', 'B':
|
||||
encoding = "base64"
|
||||
}
|
||||
|
||||
dat := decodeText([]byte(text), encoding, charset, true)
|
||||
if dat == nil {
|
||||
return
|
||||
}
|
||||
return dat, rest, true
|
||||
}
|
||||
|
||||
func decodeQP(dat []byte, underscore bool) []byte {
|
||||
out := make([]byte, len(dat))
|
||||
w := 0
|
||||
for i := 0; i < len(dat); i++ {
|
||||
c := dat[i]
|
||||
if underscore && c == '_' {
|
||||
out[w] = ' '
|
||||
w++
|
||||
continue
|
||||
}
|
||||
if c == '\r' {
|
||||
continue
|
||||
}
|
||||
if c == '=' {
|
||||
if i+1 < len(dat) && dat[i+1] == '\n' {
|
||||
i++
|
||||
continue
|
||||
}
|
||||
if i+2 < len(dat) && dat[i+1] == '\r' && dat[i+2] == '\n' {
|
||||
i += 2
|
||||
continue
|
||||
}
|
||||
if i+2 < len(dat) {
|
||||
v := unhex(dat[i+1])<<4 | unhex(dat[i+2])
|
||||
if v >= 0 {
|
||||
out[w] = byte(v)
|
||||
w++
|
||||
i += 2
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
out[w] = c
|
||||
w++
|
||||
}
|
||||
return out[:w]
|
||||
}
|
||||
|
||||
func nocrnl(dat []byte) []byte {
|
||||
w := 0
|
||||
for _, c := range dat {
|
||||
if c != '\r' && c != '\n' {
|
||||
dat[w] = c
|
||||
w++
|
||||
}
|
||||
}
|
||||
return dat[:w]
|
||||
}
|
||||
|
||||
func decode64(dat []byte) []byte {
|
||||
out := make([]byte, len(dat))
|
||||
copy(out, dat)
|
||||
out = nocrnl(out)
|
||||
n, err := base64.StdEncoding.Decode(out, out)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
return out[:n]
|
||||
}
|
||||
|
||||
func decodeText(dat []byte, encoding, charset string, underscore bool) []byte {
|
||||
odat := dat
|
||||
switch strlwr(encoding) {
|
||||
case "quoted-printable":
|
||||
dat = decodeQP(dat, underscore)
|
||||
case "base64":
|
||||
dat = decode64(dat)
|
||||
}
|
||||
if dat == nil {
|
||||
return nil
|
||||
}
|
||||
if bytes.IndexByte(dat, '\r') >= 0 {
|
||||
if &odat[0] == &dat[0] {
|
||||
dat = append([]byte(nil), dat...)
|
||||
}
|
||||
dat = nocr(dat)
|
||||
}
|
||||
|
||||
charset = strlwr(charset)
|
||||
if charset == "utf-8" || charset == "us-ascii" {
|
||||
return dat
|
||||
}
|
||||
if charset == "iso-8859-1" {
|
||||
// Avoid allocation for iso-8859-1 that is really just ascii.
|
||||
for _, c := range dat {
|
||||
if c >= 0x80 {
|
||||
goto NeedConv
|
||||
}
|
||||
}
|
||||
return dat
|
||||
NeedConv:
|
||||
}
|
||||
|
||||
// TODO: big5, iso-2022-jp
|
||||
|
||||
tab := convtab[charset]
|
||||
if tab == nil {
|
||||
return dat
|
||||
}
|
||||
var b bytes.Buffer
|
||||
for _, c := range dat {
|
||||
if tab[c] < 0 {
|
||||
b.WriteRune(unicode.ReplacementChar)
|
||||
} else {
|
||||
b.WriteRune(tab[c])
|
||||
}
|
||||
}
|
||||
return b.Bytes()
|
||||
}
|
||||
|
||||
var convtab = map[string]*[256]rune{
|
||||
"iso-8859-1": &tab_iso8859_1,
|
||||
"iso-8859-2": &tab_iso8859_2,
|
||||
"iso-8859-3": &tab_iso8859_3,
|
||||
"iso-8859-4": &tab_iso8859_4,
|
||||
"iso-8859-5": &tab_iso8859_5,
|
||||
"iso-8859-6": &tab_iso8859_6,
|
||||
"iso-8859-7": &tab_iso8859_7,
|
||||
"iso-8859-8": &tab_iso8859_8,
|
||||
"iso-8859-9": &tab_iso8859_9,
|
||||
"iso-8859-10": &tab_iso8859_10,
|
||||
"iso-8859-15": &tab_iso8859_15,
|
||||
"koi8-r": &tab_koi8,
|
||||
"windows-1250": &tab_cp1250,
|
||||
"windows-1251": &tab_cp1251,
|
||||
"windows-1252": &tab_cp1252,
|
||||
"windows-1253": &tab_cp1253,
|
||||
"windows-1254": &tab_cp1254,
|
||||
"windows-1255": &tab_cp1255,
|
||||
"windows-1256": &tab_cp1256,
|
||||
"windows-1257": &tab_cp1257,
|
||||
"windows-1258": &tab_cp1258,
|
||||
}
|
||||
|
||||
func unrfc2047(s string) string {
|
||||
if !strings.Contains(s, "=?") {
|
||||
return s
|
||||
}
|
||||
var buf bytes.Buffer
|
||||
for {
|
||||
// =?charset?e?text?=
|
||||
i := strings.Index(s, "=?")
|
||||
if i < 0 {
|
||||
break
|
||||
}
|
||||
conv, rest, ok := decode2047chunk(s[i:])
|
||||
if !ok {
|
||||
buf.WriteString(s[:i+2])
|
||||
s = s[i+2:]
|
||||
continue
|
||||
}
|
||||
buf.WriteString(s[:i])
|
||||
buf.Write(conv)
|
||||
s = rest
|
||||
}
|
||||
buf.WriteString(s)
|
||||
return buf.String()
|
||||
}
|
||||
|
||||
func lwr(c rune) rune {
|
||||
if 'A' <= c && c <= 'Z' {
|
||||
return c + 'a' - 'A'
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
||||
func strlwr(s string) string {
|
||||
return strings.Map(lwr, s)
|
||||
}
|
||||
|
||||
func unhex(c byte) int {
|
||||
switch {
|
||||
case '0' <= c && c <= '9':
|
||||
return int(c) - '0'
|
||||
case 'a' <= c && c <= 'f':
|
||||
return int(c) - 'a' + 10
|
||||
case 'A' <= c && c <= 'F':
|
||||
return int(c) - 'A' + 10
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
// TODO: Will need modified UTF-7 eventually.
|
||||
26
vendor/github.com/mattermost/rsc/imap/decode_test.go
сгенерированный
поставляемый
Обычный файл
26
vendor/github.com/mattermost/rsc/imap/decode_test.go
сгенерированный
поставляемый
Обычный файл
@@ -0,0 +1,26 @@
|
||||
package imap
|
||||
|
||||
import "testing"
|
||||
|
||||
var unrfc2047Tests = []struct {
|
||||
in, out string
|
||||
}{
|
||||
{"hello world", "hello world"},
|
||||
{"hello =?iso-8859-1?q?this is some text?=", "hello this is some text"},
|
||||
{"=?US-ASCII?Q?Keith_Moore?=", "Keith Moore"},
|
||||
{"=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?=", "Keld Jørn Simonsen"},
|
||||
{"=?ISO-8859-1?Q?Andr=E9?= Pirard", "André Pirard"},
|
||||
{"=?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?=", "If you can read this yo"},
|
||||
{"=?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?=", "u understand the example."},
|
||||
{"=?ISO-8859-1?Q?Olle_J=E4rnefors?=", "Olle Järnefors"},
|
||||
// {"=?iso-2022-jp?B?GyRCTTVKISRKP006SiRyS34kPyQ3JEZKcz03JCIkahsoQg==?=", ""},
|
||||
{"=?UTF-8?B?Ik5pbHMgTy4gU2Vsw6VzZGFsIg==?=", `"Nils O. Selåsdal"`},
|
||||
}
|
||||
|
||||
func TestUnrfc2047(t *testing.T) {
|
||||
for _, tt := range unrfc2047Tests {
|
||||
if out := unrfc2047(tt.in); out != tt.out {
|
||||
t.Errorf("unrfc2047(%#q) = %#q, want %#q", tt.in, out, tt.out)
|
||||
}
|
||||
}
|
||||
}
|
||||
1110
vendor/github.com/mattermost/rsc/imap/imap.go
сгенерированный
поставляемый
Обычный файл
1110
vendor/github.com/mattermost/rsc/imap/imap.go
сгенерированный
поставляемый
Обычный файл
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
433
vendor/github.com/mattermost/rsc/imap/imap_test.go
сгенерированный
поставляемый
Обычный файл
433
vendor/github.com/mattermost/rsc/imap/imap_test.go
сгенерированный
поставляемый
Обычный файл
@@ -0,0 +1,433 @@
|
||||
package imap
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/mattermost/rsc/google"
|
||||
)
|
||||
|
||||
// NOTE: web address is https://mail.google.com/mail/b/rsc@swtch.com/?shva=1#inbox/132e5fd3a6a3c17b
|
||||
// where the last is the hex for the thread id.
|
||||
// have to have the #inbox part right too. #label/Hello+World/...
|
||||
// or #all as a fallback
|
||||
|
||||
// TODO: ID command support (RFC 2971)
|
||||
|
||||
const mock = true
|
||||
|
||||
var user = "rsc@swtch.com"
|
||||
var pw, _ = ioutil.ReadFile("/Users/rsc/.swtchpass")
|
||||
|
||||
func TestImap(t *testing.T) {
|
||||
var user, pw string
|
||||
if mock {
|
||||
testDial = fakeDial
|
||||
user = "gre@host.com"
|
||||
pw = "password"
|
||||
} else {
|
||||
acct := google.Acct("rsc@swtch.com")
|
||||
user = acct.Email
|
||||
pw = acct.Password
|
||||
}
|
||||
c, err := NewClient(TLS, "imap.gmail.com", user, pw, "")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
inbox := c.Inbox()
|
||||
msgs := inbox.Msgs()
|
||||
|
||||
for _, m := range msgs {
|
||||
if m.UID == 611764547<<32|57046 {
|
||||
// c.io.lock()
|
||||
// c.cmd(c.boxByName[`[Gmail]/All Mail`], `UID SEARCH X-GM-RAW "label:russcox@gmail.com in:inbox in:unread -in:muted"`)
|
||||
// c.cmd(c.inbox, `UID SEARCH X-GM-RAW "label:russcox@gmail.com in:inbox in:unread -in:muted"`)
|
||||
// c.cmd(c.boxByName[`To Read`], `UID SEARCH X-GM-RAW "label:russcox@gmail.com in:inbox in:unread -in:muted"`)
|
||||
// c.cmd(c.boxByName[`[Gmail]/All Mail`], `UID SEARCH X-GM-RAW "label:russcox@gmail.com in:inbox in:unread -in:muted"`)
|
||||
// c.fetch(m.Root.Child[0], "")
|
||||
// c.io.unlock()
|
||||
fmt.Println("--")
|
||||
fmt.Println("From:", m.Hdr.From)
|
||||
fmt.Println("To:", m.Hdr.To)
|
||||
fmt.Println("Subject:", m.Hdr.Subject)
|
||||
fmt.Println("M-Date:", time.Unix(m.Date, 0))
|
||||
fmt.Println("Date:", m.Hdr.Date)
|
||||
fmt.Println()
|
||||
fmt.Println(string(m.Root.Child[0].Text()))
|
||||
fmt.Println("--")
|
||||
}
|
||||
}
|
||||
c.Close()
|
||||
}
|
||||
|
||||
func fakeDial(server string, mode Mode) (io.ReadWriteCloser, error) {
|
||||
r1, w1 := io.Pipe()
|
||||
r2, w2 := io.Pipe()
|
||||
go fakeServer(&pipe2{r1, w2})
|
||||
return &pipe2{r2, w1}, nil
|
||||
}
|
||||
|
||||
func fakeServer(rw io.ReadWriteCloser) {
|
||||
b := bufio.NewReader(rw)
|
||||
rw.Write([]byte(fakeReply[""]))
|
||||
for {
|
||||
line, err := b.ReadString('\n')
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
reply := fakeReply[strings.TrimSpace(line)]
|
||||
if reply == "" {
|
||||
rw.Write([]byte("* BYE\r\n"))
|
||||
break
|
||||
}
|
||||
rw.Write([]byte(reply))
|
||||
}
|
||||
rw.Close()
|
||||
}
|
||||
|
||||
var fakeReply = map[string]string{
|
||||
``: "* OK Gimap ready for requests from 71.232.17.63 k7if4537693qcx.66\r\n",
|
||||
`# LOGIN gre@host.com password`: "* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 UIDPLUS COMPRESS=DEFLATE\r\n" +
|
||||
"# OK gre@host.com Grace Emlin authenticated (Success)\r\n",
|
||||
`# XLIST "" INBOX`: `* XLIST (\HasNoChildren \Inbox) "/" "Inbox"` + "\r\n" +
|
||||
"# OK Success\r\n",
|
||||
`# XLIST "" *`: `* XLIST (\HasNoChildren \Inbox) "/" "Inbox"` + "\r\n" +
|
||||
`* XLIST (\HasNoChildren) "/" "Someday"` + "\r\n" +
|
||||
`* XLIST (\HasNoChildren) "/" "To Read"` + "\r\n" +
|
||||
`* XLIST (\HasNoChildren) "/" "Waiting"` + "\r\n" +
|
||||
`* XLIST (\Noselect \HasChildren) "/" "[Gmail]"` + "\r\n" +
|
||||
`* XLIST (\HasNoChildren \AllMail) "/" "[Gmail]/All Mail"` + "\r\n" +
|
||||
`* XLIST (\HasNoChildren \Drafts) "/" "[Gmail]/Drafts"` + "\r\n" +
|
||||
`* XLIST (\HasNoChildren \Important) "/" "[Gmail]/Important"` + "\r\n" +
|
||||
`* XLIST (\HasNoChildren \Sent) "/" "[Gmail]/Sent Mail"` + "\r\n" +
|
||||
`* XLIST (\HasNoChildren \Spam) "/" "[Gmail]/Spam"` + "\r\n" +
|
||||
`* XLIST (\HasNoChildren \Starred) "/" "[Gmail]/Starred"` + "\r\n" +
|
||||
`* XLIST (\HasNoChildren \Trash) "/" "[Gmail]/Trash"` + "\r\n" +
|
||||
`* XLIST (\HasNoChildren) "/" "russcox@gmail.com"` + "\r\n" +
|
||||
"# OK Success\r\n",
|
||||
`# LIST "" INBOX`: `* LIST (\HasNoChildren) "/" "INBOX"` + "\r\n" +
|
||||
"# OK Success\r\n",
|
||||
`# LIST "" *`: `* LIST (\HasNoChildren) "/" "INBOX"` + "\r\n" +
|
||||
`* LIST (\HasNoChildren) "/" "Someday"` + "\r\n" +
|
||||
`* LIST (\HasNoChildren) "/" "To Read"` + "\r\n" +
|
||||
`* LIST (\HasNoChildren) "/" "Waiting"` + "\r\n" +
|
||||
`* LIST (\Noselect \HasChildren) "/" "[Gmail]"` + "\r\n" +
|
||||
`* LIST (\HasNoChildren) "/" "[Gmail]/All Mail"` + "\r\n" +
|
||||
`* LIST (\HasNoChildren) "/" "[Gmail]/Drafts"` + "\r\n" +
|
||||
`* LIST (\HasNoChildren) "/" "[Gmail]/Important"` + "\r\n" +
|
||||
`* LIST (\HasNoChildren) "/" "[Gmail]/Sent Mail"` + "\r\n" +
|
||||
`* LIST (\HasNoChildren) "/" "[Gmail]/Spam"` + "\r\n" +
|
||||
`* LIST (\HasNoChildren) "/" "[Gmail]/Starred"` + "\r\n" +
|
||||
`* LIST (\HasNoChildren) "/" "[Gmail]/Trash"` + "\r\n" +
|
||||
`* LIST (\HasNoChildren) "/" "russcox@gmail.com"` + "\r\n" +
|
||||
"# OK Success\r\n",
|
||||
`# SELECT inbox`: `* FLAGS (\Answered \Flagged \Draft \Deleted \Seen)` + "\r\n" +
|
||||
`* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)] Flags permitted.` + "\r\n" +
|
||||
`* OK [UIDVALIDITY 611764547] UIDs valid.` + "\r\n" +
|
||||
`* 9 EXISTS` + "\r\n" +
|
||||
`* 0 RECENT` + "\r\n" +
|
||||
`* OK [UIDNEXT 57027] Predicted next UID.` + "\r\n" +
|
||||
"# OK [READ-WRITE] inbox selected. (Success)\r\n",
|
||||
`# UID FETCH 1:* (FLAGS)`: `* 1 FETCH (UID 46074 FLAGS (\Seen))` + "\r\n" +
|
||||
`* 2 FETCH (UID 49094 FLAGS (\Seen))` + "\r\n" +
|
||||
`* 3 FETCH (UID 49317 FLAGS (\Seen))` + "\r\n" +
|
||||
`* 4 FETCH (UID 49424 FLAGS (\Flagged \Seen))` + "\r\n" +
|
||||
`* 5 FETCH (UID 49595 FLAGS (\Seen))` + "\r\n" +
|
||||
`* 6 FETCH (UID 49810 FLAGS (\Seen))` + "\r\n" +
|
||||
`* 7 FETCH (UID 50579 FLAGS (\Seen))` + "\r\n" +
|
||||
`* 8 FETCH (UID 50597 FLAGS (\Seen))` + "\r\n" +
|
||||
`* 9 FETCH (UID 50598 FLAGS (\Seen))` + "\r\n" +
|
||||
"# OK Success\r\n",
|
||||
`# FETCH 1:* (UID FLAGS)`: `* 1 FETCH (UID 46074 FLAGS (\Seen))` + "\r\n" +
|
||||
`* 2 FETCH (UID 49094 FLAGS (\Seen))` + "\r\n" +
|
||||
`* 3 FETCH (UID 49317 FLAGS (\Seen))` + "\r\n" +
|
||||
`* 4 FETCH (UID 49424 FLAGS (\Flagged \Seen))` + "\r\n" +
|
||||
`* 5 FETCH (UID 49595 FLAGS (\Seen))` + "\r\n" +
|
||||
`* 6 FETCH (UID 49810 FLAGS (\Seen))` + "\r\n" +
|
||||
`* 7 FETCH (UID 50579 FLAGS (\Seen))` + "\r\n" +
|
||||
`* 8 FETCH (UID 50597 FLAGS (\Seen))` + "\r\n" +
|
||||
`* 9 FETCH (UID 50598 FLAGS (\Seen))` + "\r\n" +
|
||||
"# OK Success\r\n",
|
||||
`# NOOP`: "# OK Success\r\n",
|
||||
`# UID FETCH 1:* (FLAGS X-GM-MSGID X-GM-THRID)`: `* 1 FETCH (X-GM-THRID 1371690017835349492 X-GM-MSGID 1371690017835349492 UID 46074 FLAGS (\Seen))` + "\r\n" +
|
||||
`* 2 FETCH (X-GM-THRID 1370053443095117076 X-GM-MSGID 1374032778063810116 UID 49094 FLAGS (\Seen))` + "\r\n" +
|
||||
`* 3 FETCH (X-GM-THRID 1370053443095117076 X-GM-MSGID 1374171123044094435 UID 49317 FLAGS (\Seen))` + "\r\n" +
|
||||
`* 4 FETCH (X-GM-THRID 1374260005724669308 X-GM-MSGID 1374260005724669308 UID 49424 FLAGS (\Flagged \Seen))` + "\r\n" +
|
||||
`* 5 FETCH (X-GM-THRID 1374399840419707240 X-GM-MSGID 1374399840419707240 UID 49595 FLAGS (\Seen))` + "\r\n" +
|
||||
`* 6 FETCH (X-GM-THRID 1374564698687599195 X-GM-MSGID 1374564698687599195 UID 49810 FLAGS (\Seen))` + "\r\n" +
|
||||
`* 7 FETCH (X-GM-THRID 1353701773219222407 X-GM-MSGID 1375207927094695931 UID 50579 FLAGS (\Seen))` + "\r\n" +
|
||||
`* 8 FETCH (X-GM-THRID 1375017086705541883 X-GM-MSGID 1375220323861690146 UID 50597 FLAGS (\Seen))` + "\r\n" +
|
||||
`* 9 FETCH (X-GM-THRID 1353701773219222407 X-GM-MSGID 1375220551142026521 UID 50598 FLAGS (\Seen))` + "\r\n" +
|
||||
"# OK Success\r\n",
|
||||
`# UID FETCH 1:* (FLAGS INTERNALDATE RFC822.SIZE ENVELOPE X-GM-MSGID X-GM-THRID)`: `* 1 FETCH (X-GM-THRID 1371690017835349492 X-GM-MSGID 1371690017835349492 UID 46074 RFC822.SIZE 5700 INTERNALDATE "15-Jun-2011 13:45:39 +0000" FLAGS (\Seen) ENVELOPE ("Wed, 15 Jun 2011 13:45:35 +0000" "[re2-dev] Issue 40 in re2: Please make RE2::Rewrite public" ((NIL NIL "re2" "googlecode.com")) ((NIL NIL "re2-dev" "googlegroups.com")) ((NIL NIL "codesite-noreply" "google.com")) ((NIL NIL "re2-dev" "googlegroups.com")) NIL NIL NIL "<0-13244084390050003171-8842966241254494762-re2=googlecode.com@googlecode.com>"))` + "\r\n" +
|
||||
`* 2 FETCH (X-GM-THRID 1370053443095117076 X-GM-MSGID 1374032778063810116 UID 49094 RFC822.SIZE 3558 INTERNALDATE "11-Jul-2011 10:22:49 +0000" FLAGS (\Seen) ENVELOPE ("Mon, 11 Jul 2011 12:22:46 +0200" "Re: [re2-dev] Re: Issue 39 in re2: Eiffel wrapper for RE2" (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Russ Cox" NIL "rsc" "swtch.com")) NIL NIL "<CADSkJJWthFb61R1tqJxZP1SxTPuwY_BBW5ToLuzX2UpHSvsy9w@mail.gmail.com>" "<4E1ACEF6.4060609@gmail.com>"))` + "\r\n" +
|
||||
`* 3 FETCH (X-GM-THRID 1370053443095117076 X-GM-MSGID 1374171123044094435 UID 49317 RFC822.SIZE 3323 INTERNALDATE "12-Jul-2011 23:01:46 +0000" FLAGS (\Seen) ENVELOPE ("Wed, 13 Jul 2011 01:01:41 +0200" "Re: [re2-dev] Re: Issue 39 in re2: Eiffel wrapper for RE2" (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Russ Cox" NIL "rsc" "swtch.com")) NIL NIL "<CADSkJJV+E-0Xtm=dpiSHLbwkZjZ=zDDoE1t1w0CiGYa+pVz66g@mail.gmail.com>" "<4E1CD255.6060807@gmail.com>"))` + "\r\n" +
|
||||
`* 4 FETCH (X-GM-THRID 1374260005724669308 X-GM-MSGID 1374260005724669308 UID 49424 RFC822.SIZE 2681 INTERNALDATE "13-Jul-2011 22:34:31 +0000" FLAGS (\Flagged \Seen) ENVELOPE ("Wed, 13 Jul 2011 16:33:43 -0600" "Minor correction for venti(8) user manual for running plan9port on Linux" (("Xing" NIL "xinglin" "cs.utah.edu")) (("Xing" NIL "xinglin" "cs.utah.edu")) (("Xing" NIL "xinglin" "cs.utah.edu")) ((NIL NIL "rsc" "swtch.com")) (("Xing Lin" NIL "xinglin" "cs.utah.edu") ("Raghuveer Pullakandam" NIL "rgv" "cs.utah.edu") ("Robert Ricci" NIL "ricci" "cs.utah.edu") ("Eric Eide" NIL "eeide" "cs.utah.edu")) NIL NIL "<1310596423.3866.11.camel@xing-utah-cs>"))` + "\r\n" +
|
||||
`* 5 FETCH (X-GM-THRID 1374399840419707240 X-GM-MSGID 1374399840419707240 UID 49595 RFC822.SIZE 6496 INTERNALDATE "15-Jul-2011 11:37:07 +0000" FLAGS (\Seen) ENVELOPE ("Fri, 15 Jul 2011 13:36:54 +0200" "[re2-dev] MSVC not exporting VariadicFunction2<.. FullMatchN>::operator()(..) but VariadicFunction2<.. PartialMatchN>::operator()(..)" (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) ((NIL NIL "re2-dev" "googlegroups.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) ((NIL NIL "re2-dev" "googlegroups.com")) NIL NIL NIL "<4E202656.7010408@gmail.com>"))` + "\r\n" +
|
||||
`* 6 FETCH (X-GM-THRID 1374564698687599195 X-GM-MSGID 1374564698687599195 UID 49810 RFC822.SIZE 5485 INTERNALDATE "17-Jul-2011 07:17:29 +0000" FLAGS (\Seen) ENVELOPE ("Sun, 17 Jul 2011 00:17:28 -0700" "Acme IRC client patch" (("Ethan Burns" NIL "burns.ethan" "gmail.com")) (("Ethan Burns" NIL "burns.ethan" "gmail.com")) (("Ethan Burns" NIL "burns.ethan" "gmail.com")) ((NIL NIL "rsc" "swtch.com")) NIL NIL NIL "<CAGE=Ei0bmAjsYYDxCgtDObuxX_tCU18RcWTe6siwemXAuKqDfg@mail.gmail.com>"))` + "\r\n" +
|
||||
`* 7 FETCH (X-GM-THRID 1353701773219222407 X-GM-MSGID 1375207927094695931 UID 50579 RFC822.SIZE 4049 INTERNALDATE "24-Jul-2011 09:41:19 +0000" FLAGS (\Seen) ENVELOPE ("Sun, 24 Jul 2011 02:41:14 -0700 (PDT)" "Re: [re2-dev] Re: MSVC build" ((NIL NIL "talgil" "gmail.com")) ((NIL NIL "re2-dev" "googlegroups.com")) ((NIL NIL "re2-dev" "googlegroups.com")) ((NIL NIL "re2-dev" "googlegroups.com")) (("ioannis" NIL "ioannis.e" "gmail.com")) NIL "<AANLkTin8_-yDr8tcb9SosfQ_iAM6RmfzpLQB0gX0vv6w@mail.gmail.com>" "<24718992.6777.1311500475040.JavaMail.geo-discussion-forums@yqyy3>"))` + "\r\n" +
|
||||
`* 8 FETCH (X-GM-THRID 1375017086705541883 X-GM-MSGID 1375220323861690146 UID 50597 RFC822.SIZE 3070 INTERNALDATE "24-Jul-2011 12:58:22 +0000" FLAGS (\Seen) ENVELOPE ("Sun, 24 Jul 2011 14:58:15 +0200" "Re: [re2-dev] Rearranging platform dependant features" (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Russ Cox" NIL "rsc" "swtch.com")) NIL NIL "<CADSkJJV+eCPkkhsepo5k0w+dqVo0fQOana2bWp4BexGOrCSSUQ@mail.gmail.com>" "<4E2C16E7.3060500@gmail.com>"))` + "\r\n" +
|
||||
`* 9 FETCH (X-GM-THRID 1353701773219222407 X-GM-MSGID 1375220551142026521 UID 50598 RFC822.SIZE 5744 INTERNALDATE "24-Jul-2011 13:01:59 +0000" FLAGS (\Seen) ENVELOPE ("Sun, 24 Jul 2011 15:01:49 +0200" "Re: [re2-dev] Re: MSVC build" (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) ((NIL NIL "re2-dev" "googlegroups.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) ((NIL NIL "re2-dev" "googlegroups.com")) NIL NIL "<24718992.6777.1311500475040.JavaMail.geo-discussion-forums@yqyy3>" "<4E2C17BD.6000702@gmail.com>"))` + "\r\n" +
|
||||
"# OK Success\r\n",
|
||||
`# UID FETCH 57047:* (FLAGS INTERNALDATE RFC822.SIZE ENVELOPE BODY X-GM-MSGID X-GM-THRID X-GM-LABELS)`: `* 9 FETCH (X-GM-THRID 1382192619814696847 X-GM-MSGID 1382192619814696847 X-GM-LABELS ("\\Important" russcox@gmail.com) UID 57046 RFC822.SIZE 4170 INTERNALDATE "09-Oct-2011 12:00:02 +0000" FLAGS () ENVELOPE ("Sun, 09 Oct 2011 12:00:02 +0000" "You have no events scheduled today." (("Google Calendar" NIL "calendar-notification" "google.com")) (("Google Calendar" NIL "calendar-notification" "google.com")) (("Russ Cox" NIL "russcox" "gmail.com")) (("Russ Cox" NIL "russcox" "gmail.com")) NIL NIL NIL "<bcaec501c5be15fc7204aedc6af6@google.com>") BODY (("TEXT" "PLAIN" ("CHARSET" "ISO-8859-1" "DELSP" "yes" "FORMAT" "flowed") NIL NIL "7BIT" 465 11)("TEXT" "HTML" ("CHARSET" "ISO-8859-1") NIL NIL "QUOTED-PRINTABLE" 914 12) "ALTERNATIVE"))` + "\r\n" +
|
||||
"# OK Success\r\n",
|
||||
`# UID FETCH 1:* (FLAGS INTERNALDATE RFC822.SIZE ENVELOPE BODY X-GM-MSGID X-GM-THRID X-GM-LABELS)`: `* 1 FETCH (X-GM-THRID 1371690017835349492 X-GM-MSGID 1371690017835349492 X-GM-LABELS () UID 46074 RFC822.SIZE 5700 INTERNALDATE "15-Jun-2011 13:45:39 +0000" FLAGS (\Seen) ENVELOPE ("Wed, 15 Jun 2011 13:45:35 +0000" "[re2-dev] Issue 40 in re2: Please make RE2::Rewrite public" ((NIL NIL "re2" "googlecode.com")) ((NIL NIL "re2-dev" "googlegroups.com")) ((NIL NIL "codesite-noreply" "google.com")) ((NIL NIL "re2-dev" "googlegroups.com")) NIL NIL NIL "<0-13244084390050003171-8842966241254494762-re2=googlecode.com@googlecode.com>") BODY ("TEXT" "PLAIN" ("CHARSET" "ISO-8859-1" "DELSP" "yes" "FORMAT" "flowed") NIL NIL "7BIT" 389 11))` + "\r\n" +
|
||||
`* 2 FETCH (X-GM-THRID 1370053443095117076 X-GM-MSGID 1374032778063810116 X-GM-LABELS ("\\Important") UID 49094 RFC822.SIZE 3558 INTERNALDATE "11-Jul-2011 10:22:49 +0000" FLAGS (\Seen) ENVELOPE ("Mon, 11 Jul 2011 12:22:46 +0200" "Re: [re2-dev] Re: Issue 39 in re2: Eiffel wrapper for RE2" (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Russ Cox" NIL "rsc" "swtch.com")) NIL NIL "<CADSkJJWthFb61R1tqJxZP1SxTPuwY_BBW5ToLuzX2UpHSvsy9w@mail.gmail.com>" "<4E1ACEF6.4060609@gmail.com>") BODY ("TEXT" "PLAIN" ("CHARSET" "UTF-8" "FORMAT" "flowed") NIL NIL "7BIT" 766 24))` + "\r\n" +
|
||||
`* 3 FETCH (X-GM-THRID 1370053443095117076 X-GM-MSGID 1374171123044094435 X-GM-LABELS ("\\Important") UID 49317 RFC822.SIZE 3323 INTERNALDATE "12-Jul-2011 23:01:46 +0000" FLAGS (\Seen) ENVELOPE ("Wed, 13 Jul 2011 01:01:41 +0200" "Re: [re2-dev] Re: Issue 39 in re2: Eiffel wrapper for RE2" (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Russ Cox" NIL "rsc" "swtch.com")) NIL NIL "<CADSkJJV+E-0Xtm=dpiSHLbwkZjZ=zDDoE1t1w0CiGYa+pVz66g@mail.gmail.com>" "<4E1CD255.6060807@gmail.com>") BODY ("TEXT" "PLAIN" ("CHARSET" "UTF-8" "FORMAT" "flowed") NIL NIL "7BIT" 435 12))` + "\r\n" +
|
||||
`* 4 FETCH (X-GM-THRID 1374260005724669308 X-GM-MSGID 1374260005724669308 X-GM-LABELS ("\\Important" "\\Starred") UID 49424 RFC822.SIZE 2681 INTERNALDATE "13-Jul-2011 22:34:31 +0000" FLAGS (\Flagged \Seen) ENVELOPE ("Wed, 13 Jul 2011 16:33:43 -0600" "Minor correction for venti(8) user manual for running plan9port on Linux" (("Xing" NIL "xinglin" "cs.utah.edu")) (("Xing" NIL "xinglin" "cs.utah.edu")) (("Xing" NIL "xinglin" "cs.utah.edu")) ((NIL NIL "rsc" "swtch.com")) (("Xing Lin" NIL "xinglin" "cs.utah.edu") ("Raghuveer Pullakandam" NIL "rgv" "cs.utah.edu") ("Robert Ricci" NIL "ricci" "cs.utah.edu") ("Eric Eide" NIL "eeide" "cs.utah.edu")) NIL NIL "<1310596423.3866.11.camel@xing-utah-cs>") BODY ("TEXT" "PLAIN" ("CHARSET" "UTF-8") NIL NIL "8BIT" 789 25))` + "\r\n" +
|
||||
`* 5 FETCH (X-GM-THRID 1374399840419707240 X-GM-MSGID 1374399840419707240 X-GM-LABELS ("\\Important") UID 49595 RFC822.SIZE 6496 INTERNALDATE "15-Jul-2011 11:37:07 +0000" FLAGS (\Seen) ENVELOPE ("Fri, 15 Jul 2011 13:36:54 +0200" "[re2-dev] MSVC not exporting VariadicFunction2<.. FullMatchN>::operator()(..) but VariadicFunction2<.. PartialMatchN>::operator()(..)" (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) ((NIL NIL "re2-dev" "googlegroups.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) ((NIL NIL "re2-dev" "googlegroups.com")) NIL NIL NIL "<4E202656.7010408@gmail.com>") BODY ("TEXT" "PLAIN" ("CHARSET" "ISO-8859-1" "FORMAT" "flowed") NIL NIL "7BIT" 1660 34))` + "\r\n" +
|
||||
`* 6 FETCH (X-GM-THRID 1374564698687599195 X-GM-MSGID 1374564698687599195 X-GM-LABELS ("\\Important") UID 49810 RFC822.SIZE 5485 INTERNALDATE "17-Jul-2011 07:17:29 +0000" FLAGS (\Seen) ENVELOPE ("Sun, 17 Jul 2011 00:17:28 -0700" "Acme IRC client patch" (("Ethan Burns" NIL "burns.ethan" "gmail.com")) (("Ethan Burns" NIL "burns.ethan" "gmail.com")) (("Ethan Burns" NIL "burns.ethan" "gmail.com")) ((NIL NIL "rsc" "swtch.com")) NIL NIL NIL "<CAGE=Ei0bmAjsYYDxCgtDObuxX_tCU18RcWTe6siwemXAuKqDfg@mail.gmail.com>") BODY (("TEXT" "PLAIN" ("CHARSET" "ISO-8859-1") NIL NIL "7BIT" 443 13)("TEXT" "X-PATCH" ("CHARSET" "US-ASCII" "NAME" "emote.patch") NIL NIL "BASE64" 2774 35) "MIXED"))` + "\r\n" +
|
||||
`* 7 FETCH (X-GM-THRID 1353701773219222407 X-GM-MSGID 1375207927094695931 X-GM-LABELS ("\\Important") UID 50579 RFC822.SIZE 4049 INTERNALDATE "24-Jul-2011 09:41:19 +0000" FLAGS (\Seen) ENVELOPE ("Sun, 24 Jul 2011 02:41:14 -0700 (PDT)" "Re: [re2-dev] Re: MSVC build" ((NIL NIL "talgil" "gmail.com")) ((NIL NIL "re2-dev" "googlegroups.com")) ((NIL NIL "re2-dev" "googlegroups.com")) ((NIL NIL "re2-dev" "googlegroups.com")) (("ioannis" NIL "ioannis.e" "gmail.com")) NIL "<AANLkTin8_-yDr8tcb9SosfQ_iAM6RmfzpLQB0gX0vv6w@mail.gmail.com>" "<24718992.6777.1311500475040.JavaMail.geo-discussion-forums@yqyy3>") BODY (("TEXT" "PLAIN" ("CHARSET" "UTF-8") NIL NIL "7BIT" 133 8)("TEXT" "HTML" ("CHARSET" "UTF-8") NIL NIL "7BIT" 211 0) "ALTERNATIVE"))` + "\r\n" +
|
||||
`* 8 FETCH (X-GM-THRID 1375017086705541883 X-GM-MSGID 1375220323861690146 X-GM-LABELS ("\\Important") UID 50597 RFC822.SIZE 3070 INTERNALDATE "24-Jul-2011 12:58:22 +0000" FLAGS (\Seen) ENVELOPE ("Sun, 24 Jul 2011 14:58:15 +0200" "Re: [re2-dev] Rearranging platform dependant features" (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Pontus Carlsson" NIL "pontusjoncarlsson" "gmail.com")) (("Russ Cox" NIL "rsc" "swtch.com")) NIL NIL "<CADSkJJV+eCPkkhsepo5k0w+dqVo0fQOana2bWp4BexGOrCSSUQ@mail.gmail.com>" "<4E2C16E7.3060500@gmail.com>") BODY ("TEXT" "PLAIN" ("CHARSET" "UTF-8" "FORMAT" "flowed") NIL NIL "7BIT" 450 10))` + "\r\n" +
|
||||
`* 9 FETCH (X-GM-THRID 1382192619814696847 X-GM-MSGID 1382192619814696847 X-GM-LABELS ("\\Important" russcox@gmail.com) UID 57046 RFC822.SIZE 4170 INTERNALDATE "09-Oct-2011 12:00:02 +0000" FLAGS () ENVELOPE ("Sun, 09 Oct 2011 12:00:02 +0000" "You have no events scheduled today." (("Google Calendar" NIL "calendar-notification" "google.com")) (("Google Calendar" NIL "calendar-notification" "google.com")) (("Russ Cox" NIL "russcox" "gmail.com")) (("Russ Cox" NIL "russcox" "gmail.com")) NIL NIL NIL "<bcaec501c5be15fc7204aedc6af6@google.com>") BODY (("TEXT" "PLAIN" ("CHARSET" "ISO-8859-1" "DELSP" "yes" "FORMAT" "flowed") NIL NIL "7BIT" 465 11)("TEXT" "HTML" ("CHARSET" "ISO-8859-1") NIL NIL "QUOTED-PRINTABLE" 914 12) "ALTERNATIVE"))` + "\r\n" +
|
||||
"# OK Success\r\n",
|
||||
`# UID FETCH 57046 BODY[1]`: `* 9 FETCH (UID 57046 BODY[1] {465}` + "\r\n" +
|
||||
`russcox@gmail.com, you have no events scheduled today Sun Oct 9, 2011.` + "\r\n" +
|
||||
`` + "\r\n" +
|
||||
`View your calendar at https://www.google.com/calendar/` + "\r\n" +
|
||||
`` + "\r\n" +
|
||||
`You are receiving this email at the account russcox@gmail.com because you ` + "\r\n" +
|
||||
`are subscribed to receive daily agendas for the following calendars: Russ ` + "\r\n" +
|
||||
`Cox.` + "\r\n" +
|
||||
`` + "\r\n" +
|
||||
`To change which calendars you receive daily agendas for, please log in to ` + "\r\n" +
|
||||
`https://www.google.com/calendar/ and change your notification settings for ` + "\r\n" +
|
||||
`each calendar.` + "\r\n" +
|
||||
`)` + "\r\n" +
|
||||
"# OK Success\r\n",
|
||||
`# UID FETCH 57046 BODY[1.TEXT]`: `* 9 FETCH (UID 57046 BODY[1.TEXT] NIL)` + "\r\n" +
|
||||
"# OK Success\r\n",
|
||||
`# UID FETCH 57046 BODY[1.HEADER]`: `* 9 FETCH (UID 57046 BODY[1.HEADER] NIL)` + "\r\n" +
|
||||
"# OK Success\r\n",
|
||||
`# UID FETCH 57046 BODY[1.MIME]`: `* 146 FETCH (UID 57046 BODY[1.MIME] {74}` + "\r\n" +
|
||||
`Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes` + "\r\n" +
|
||||
`` + "\r\n" +
|
||||
`)` + "\r\n" +
|
||||
"# OK Success\r\n",
|
||||
`# UID FETCH 57046 BODY[2]`: `* 146 FETCH (UID 57046 BODY[2] {914}` + "\r\n" +
|
||||
`<div style=3D"padding:10px 7px;font-size:14px;line-height:1.4;font-family:A=` + "\r\n" +
|
||||
`rial,Sans-serif;text-align:left;bgcolor=3D#ffffff"><a href=3D"https://www.g=` + "\r\n" +
|
||||
`oogle.com/calendar/"><img style=3D"border-width:0" src=3D"https://www.googl=` + "\r\n" +
|
||||
`e.com/calendar/images/calendar_logo_sm_en.gif" alt=3D"Google Calendar"></a>` + "\r\n" +
|
||||
`<p style=3D"margin:0;color:#0">russcox@gmail.com, you have no events s=` + "\r\n" +
|
||||
`cheduled today <b>Sun Oct 9, 2011</b></p>` + "\r\n" +
|
||||
`<p style=3D"font-family:Arial,Sans-serif;color:#666;font-size:11px">You are=` + "\r\n" +
|
||||
` receiving this email at the account russcox@gmail.com because you are subs=` + "\r\n" +
|
||||
`cribed to receive daily agendas for the following calendars: Russ Cox.</p>` + "\r\n" +
|
||||
`<p style=3D"font-family:Arial,Sans-serif;color:#666;font-size:11px">To chan=` + "\r\n" +
|
||||
`ge which calendars you receive daily agendas for, please log in to https://=` + "\r\n" +
|
||||
`www.google.com/calendar/ and change your notification settings for each cal=` + "\r\n" +
|
||||
`endar.</p></div>)` + "\r\n" +
|
||||
"# OK Success\r\n",
|
||||
`# UID FETCH 57046 BODY[2.TEXT]`: `* 9 FETCH (UID 57046 BODY[2.TEXT] NIL)` + "\r\n" +
|
||||
"# OK Success\r\n",
|
||||
`# UID FETCH 57046 BODY[2.HEADER]`: `* 9 FETCH (UID 57046 BODY[2.HEADER] NIL)` + "\r\n" +
|
||||
"# OK Success\r\n",
|
||||
`# UID FETCH 57046 BODY[2.MIME]`: `* 146 FETCH (UID 57046 BODY[2.MIME] {92}` + "\r\n" +
|
||||
`Content-Type: text/html; charset=ISO-8859-1` + "\r\n" +
|
||||
`Content-Transfer-Encoding: quoted-printable` + "\r\n" +
|
||||
`` + "\r\n" +
|
||||
`)` + "\r\n" +
|
||||
"# OK Success\r\n",
|
||||
`# UID FETCH 57046 BODY[]`: `* 146 FETCH (UID 57046 BODY[] {4170}` + "\r\n" +
|
||||
`Delivered-To: rsc@swtch.com` + "\r\n" +
|
||||
`Received: by 10.216.54.148 with SMTP id i20cs32329wec;` + "\r\n" +
|
||||
` Sun, 9 Oct 2011 05:00:30 -0700 (PDT)` + "\r\n" +
|
||||
`Received: by 10.227.11.2 with SMTP id r2mr4751812wbr.43.1318161630585;` + "\r\n" +
|
||||
` Sun, 09 Oct 2011 05:00:30 -0700 (PDT)` + "\r\n" +
|
||||
`DomainKey-Status: good` + "\r\n" +
|
||||
`Received-SPF: softfail (google.com: best guess record for domain of transitioning 3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com does not designate <unknown> as permitted sender)` + "\r\n" +
|
||||
`Received: by 10.241.227.90 with POP3 id 26mf2646912wyj.48;` + "\r\n" +
|
||||
` Sun, 09 Oct 2011 05:00:29 -0700 (PDT)` + "\r\n" +
|
||||
`X-Gmail-Fetch-Info: russcox@gmail.com 1 smtp.gmail.com 995 russcox` + "\r\n" +
|
||||
`Delivered-To: russcox@gmail.com` + "\r\n" +
|
||||
`Received: by 10.142.76.10 with SMTP id y10cs75487wfa;` + "\r\n" +
|
||||
` Sun, 9 Oct 2011 05:00:08 -0700 (PDT)` + "\r\n" +
|
||||
`Return-Path: <3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com>` + "\r\n" +
|
||||
`Received-SPF: pass (google.com: domain of 3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com designates 10.52.73.100 as permitted sender) client-ip=10.52.73.100;` + "\r\n" +
|
||||
`Authentication-Results: mr.google.com; spf=pass (google.com: domain of 3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com designates 10.52.73.100 as permitted sender) smtp.mail=3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com; dkim=pass header.i=3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com` + "\r\n" +
|
||||
`Received: from mr.google.com ([10.52.73.100])` + "\r\n" +
|
||||
` by 10.52.73.100 with SMTP id k4mr8053242vdv.5.1318161606360 (num_hops = 1);` + "\r\n" +
|
||||
` Sun, 09 Oct 2011 05:00:06 -0700 (PDT)` + "\r\n" +
|
||||
`DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;` + "\r\n" +
|
||||
` d=google.com; s=beta;` + "\r\n" +
|
||||
` h=mime-version:reply-to:auto-submitted:message-id:date:subject:from` + "\r\n" +
|
||||
` :to:content-type;` + "\r\n" +
|
||||
` bh=SGjz0F4q+eFVkoC4yzLKQKvlxTKiUsYbO/KPI+3KOE8=;` + "\r\n" +
|
||||
` b=LRBkWBW7ZZ4UJYa7b92zfHa0ZM1K1d0wP/jbgmDw2OZTWtgDICZb30dzhFUfNVdxeN` + "\r\n" +
|
||||
` kdMFbRhTLP5NpSXWhbDw==` + "\r\n" +
|
||||
`MIME-Version: 1.0` + "\r\n" +
|
||||
`Received: by 10.52.73.100 with SMTP id k4mr5244039vdv.5.1318161602706; Sun, 09` + "\r\n" +
|
||||
` Oct 2011 05:00:02 -0700 (PDT)` + "\r\n" +
|
||||
`Reply-To: Russ Cox <russcox@gmail.com>` + "\r\n" +
|
||||
`Auto-Submitted: auto-generated` + "\r\n" +
|
||||
`Message-ID: <bcaec501c5be15fc7204aedc6af6@google.com>` + "\r\n" +
|
||||
`Date: Sun, 09 Oct 2011 12:00:02 +0000` + "\r\n" +
|
||||
`Subject: You have no events scheduled today.` + "\r\n" +
|
||||
`From: Google Calendar <calendar-notification@google.com>` + "\r\n" +
|
||||
`To: Russ Cox <russcox@gmail.com>` + "\r\n" +
|
||||
`Content-Type: multipart/alternative; boundary=bcaec501c5be15fc6504aedc6af3` + "\r\n" +
|
||||
`` + "\r\n" +
|
||||
`--bcaec501c5be15fc6504aedc6af3` + "\r\n" +
|
||||
`Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes` + "\r\n" +
|
||||
`` + "\r\n" +
|
||||
`russcox@gmail.com, you have no events scheduled today Sun Oct 9, 2011.` + "\r\n" +
|
||||
`` + "\r\n" +
|
||||
`View your calendar at https://www.google.com/calendar/` + "\r\n" +
|
||||
`` + "\r\n" +
|
||||
`You are receiving this email at the account russcox@gmail.com because you ` + "\r\n" +
|
||||
`are subscribed to receive daily agendas for the following calendars: Russ ` + "\r\n" +
|
||||
`Cox.` + "\r\n" +
|
||||
`` + "\r\n" +
|
||||
`To change which calendars you receive daily agendas for, please log in to ` + "\r\n" +
|
||||
`https://www.google.com/calendar/ and change your notification settings for ` + "\r\n" +
|
||||
`each calendar.` + "\r\n" +
|
||||
`` + "\r\n" +
|
||||
`--bcaec501c5be15fc6504aedc6af3` + "\r\n" +
|
||||
`Content-Type: text/html; charset=ISO-8859-1` + "\r\n" +
|
||||
`Content-Transfer-Encoding: quoted-printable` + "\r\n" +
|
||||
`` + "\r\n" +
|
||||
`<div style=3D"padding:10px 7px;font-size:14px;line-height:1.4;font-family:A=` + "\r\n" +
|
||||
`rial,Sans-serif;text-align:left;bgcolor=3D#ffffff"><a href=3D"https://www.g=` + "\r\n" +
|
||||
`oogle.com/calendar/"><img style=3D"border-width:0" src=3D"https://www.googl=` + "\r\n" +
|
||||
`e.com/calendar/images/calendar_logo_sm_en.gif" alt=3D"Google Calendar"></a>` + "\r\n" +
|
||||
`<p style=3D"margin:0;color:#0">russcox@gmail.com, you have no events s=` + "\r\n" +
|
||||
`cheduled today <b>Sun Oct 9, 2011</b></p>` + "\r\n" +
|
||||
`<p style=3D"font-family:Arial,Sans-serif;color:#666;font-size:11px">You are=` + "\r\n" +
|
||||
` receiving this email at the account russcox@gmail.com because you are subs=` + "\r\n" +
|
||||
`cribed to receive daily agendas for the following calendars: Russ Cox.</p>` + "\r\n" +
|
||||
`<p style=3D"font-family:Arial,Sans-serif;color:#666;font-size:11px">To chan=` + "\r\n" +
|
||||
`ge which calendars you receive daily agendas for, please log in to https://=` + "\r\n" +
|
||||
`www.google.com/calendar/ and change your notification settings for each cal=` + "\r\n" +
|
||||
`endar.</p></div>` + "\r\n" +
|
||||
`--bcaec501c5be15fc6504aedc6af3--` + "\r\n" +
|
||||
`)` + "\r\n" +
|
||||
"# OK Success\r\n",
|
||||
`# UID FETCH 57046 BODY[TEXT]`: `* 146 FETCH (UID 57046 BODY[TEXT] {1647}` + "\r\n" +
|
||||
`--bcaec501c5be15fc6504aedc6af3` + "\r\n" +
|
||||
`Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes` + "\r\n" +
|
||||
`` + "\r\n" +
|
||||
`russcox@gmail.com, you have no events scheduled today Sun Oct 9, 2011.` + "\r\n" +
|
||||
`` + "\r\n" +
|
||||
`View your calendar at https://www.google.com/calendar/` + "\r\n" +
|
||||
`` + "\r\n" +
|
||||
`You are receiving this email at the account russcox@gmail.com because you ` + "\r\n" +
|
||||
`are subscribed to receive daily agendas for the following calendars: Russ ` + "\r\n" +
|
||||
`Cox.` + "\r\n" +
|
||||
`` + "\r\n" +
|
||||
`To change which calendars you receive daily agendas for, please log in to ` + "\r\n" +
|
||||
`https://www.google.com/calendar/ and change your notification settings for ` + "\r\n" +
|
||||
`each calendar.` + "\r\n" +
|
||||
`` + "\r\n" +
|
||||
`--bcaec501c5be15fc6504aedc6af3` + "\r\n" +
|
||||
`Content-Type: text/html; charset=ISO-8859-1` + "\r\n" +
|
||||
`Content-Transfer-Encoding: quoted-printable` + "\r\n" +
|
||||
`` + "\r\n" +
|
||||
`<div style=3D"padding:10px 7px;font-size:14px;line-height:1.4;font-family:A=` + "\r\n" +
|
||||
`rial,Sans-serif;text-align:left;bgcolor=3D#ffffff"><a href=3D"https://www.g=` + "\r\n" +
|
||||
`oogle.com/calendar/"><img style=3D"border-width:0" src=3D"https://www.googl=` + "\r\n" +
|
||||
`e.com/calendar/images/calendar_logo_sm_en.gif" alt=3D"Google Calendar"></a>` + "\r\n" +
|
||||
`<p style=3D"margin:0;color:#0">russcox@gmail.com, you have no events s=` + "\r\n" +
|
||||
`cheduled today <b>Sun Oct 9, 2011</b></p>` + "\r\n" +
|
||||
`<p style=3D"font-family:Arial,Sans-serif;color:#666;font-size:11px">You are=` + "\r\n" +
|
||||
` receiving this email at the account russcox@gmail.com because you are subs=` + "\r\n" +
|
||||
`cribed to receive daily agendas for the following calendars: Russ Cox.</p>` + "\r\n" +
|
||||
`<p style=3D"font-family:Arial,Sans-serif;color:#666;font-size:11px">To chan=` + "\r\n" +
|
||||
`ge which calendars you receive daily agendas for, please log in to https://=` + "\r\n" +
|
||||
`www.google.com/calendar/ and change your notification settings for each cal=` + "\r\n" +
|
||||
`endar.</p></div>` + "\r\n" +
|
||||
`--bcaec501c5be15fc6504aedc6af3--` + "\r\n" +
|
||||
`)` + "\r\n" +
|
||||
"# OK Success\r\n",
|
||||
`# UID FETCH 57046 BODY[HEADER]`: `* 146 FETCH (UID 57046 BODY[HEADER] {2453}` + "\r\n" +
|
||||
`Delivered-To: rsc@swtch.com` + "\r\n" +
|
||||
`Received: by 10.216.54.148 with SMTP id i20cs32329wec; Sun, 9 Oct 2011` + "\r\n" +
|
||||
` 05:00:30 -0700 (PDT)` + "\r\n" +
|
||||
`Received: by 10.227.11.2 with SMTP id r2mr4751812wbr.43.1318161630585; Sun, 09` + "\r\n" +
|
||||
` Oct 2011 05:00:30 -0700 (PDT)` + "\r\n" +
|
||||
`DomainKey-Status: good` + "\r\n" +
|
||||
`Received-SPF: softfail (google.com: best guess record for domain of` + "\r\n" +
|
||||
` transitioning` + "\r\n" +
|
||||
` 3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com` + "\r\n" +
|
||||
` does not designate <unknown> as permitted sender)` + "\r\n" +
|
||||
`Received: by 10.241.227.90 with POP3 id 26mf2646912wyj.48; Sun, 09 Oct 2011` + "\r\n" +
|
||||
` 05:00:29 -0700 (PDT)` + "\r\n" +
|
||||
`X-Gmail-Fetch-Info: russcox@gmail.com 1 smtp.gmail.com 995 russcox` + "\r\n" +
|
||||
`Delivered-To: russcox@gmail.com` + "\r\n" +
|
||||
`Received: by 10.142.76.10 with SMTP id y10cs75487wfa; Sun, 9 Oct 2011 05:00:08` + "\r\n" +
|
||||
` -0700 (PDT)` + "\r\n" +
|
||||
`Return-Path: <3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com>` + "\r\n" +
|
||||
`Received-SPF: pass (google.com: domain of` + "\r\n" +
|
||||
` 3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com` + "\r\n" +
|
||||
` designates 10.52.73.100 as permitted sender) client-ip=10.52.73.100;` + "\r\n" +
|
||||
`Authentication-Results: mr.google.com; spf=pass (google.com: domain of` + "\r\n" +
|
||||
` 3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com` + "\r\n" +
|
||||
` designates 10.52.73.100 as permitted sender)` + "\r\n" +
|
||||
` smtp.mail=3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com;` + "\r\n" +
|
||||
` dkim=pass` + "\r\n" +
|
||||
` header.i=3woyRTgcJB5sMPNN7JSBH5DG.7JHMPNN7JSBH5DG.7JH@calendar-server.bounces.google.com` + "\r\n" +
|
||||
`Received: from mr.google.com ([10.52.73.100]) by 10.52.73.100 with SMTP id` + "\r\n" +
|
||||
` k4mr8053242vdv.5.1318161606360 (num_hops = 1); Sun, 09 Oct 2011 05:00:06` + "\r\n" +
|
||||
` -0700 (PDT)` + "\r\n" +
|
||||
`DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta;` + "\r\n" +
|
||||
` h=mime-version:reply-to:auto-submitted:message-id:date:subject:from` + "\r\n" +
|
||||
` :to:content-type; bh=SGjz0F4q+eFVkoC4yzLKQKvlxTKiUsYbO/KPI+3KOE8=;` + "\r\n" +
|
||||
` b=LRBkWBW7ZZ4UJYa7b92zfHa0ZM1K1d0wP/jbgmDw2OZTWtgDICZb30dzhFUfNVdxeN` + "\r\n" +
|
||||
` kdMFbRhTLP5NpSXWhbDw==` + "\r\n" +
|
||||
`MIME-Version: 1.0` + "\r\n" +
|
||||
`Received: by 10.52.73.100 with SMTP id k4mr5244039vdv.5.1318161602706; Sun, 09` + "\r\n" +
|
||||
` Oct 2011 05:00:02 -0700 (PDT)` + "\r\n" +
|
||||
`Reply-To: Russ Cox <russcox@gmail.com>` + "\r\n" +
|
||||
`Auto-Submitted: auto-generated` + "\r\n" +
|
||||
`Message-ID: <bcaec501c5be15fc7204aedc6af6@google.com>` + "\r\n" +
|
||||
`Date: Sun, 09 Oct 2011 12:00:02 +0000` + "\r\n" +
|
||||
`Subject: You have no events scheduled today.` + "\r\n" +
|
||||
`From: Google Calendar <calendar-notification@google.com>` + "\r\n" +
|
||||
`To: Russ Cox <russcox@gmail.com>` + "\r\n" +
|
||||
`Content-Type: multipart/alternative; boundary=bcaec501c5be15fc6504aedc6af3` + "\r\n" +
|
||||
`` + "\r\n" +
|
||||
`)` + "\r\n" +
|
||||
"# OK Success\r\n",
|
||||
`# UID FETCH 57046 BODY[MIME]`: "# BAD Could not parse command\r\n",
|
||||
}
|
||||
|
||||
/*
|
||||
mail sending
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"io/ioutil"
|
||||
"smtp"
|
||||
"time"
|
||||
)
|
||||
var pw, _ = ioutil.ReadFile("/Users/rsc/.swtchpass")
|
||||
var msg = `From: "Russ Cox" <rsc@golang.org>
|
||||
To: "Russ Cox" <rsc@google.com>
|
||||
Subject: test from Go
|
||||
|
||||
This is a message sent from Go
|
||||
`
|
||||
|
||||
BUG: Does not *REQUIRE* auth. Should.
|
||||
|
||||
func main() {
|
||||
auth := smtp.PlainAuth(
|
||||
"",
|
||||
"rsc@swtch.com",
|
||||
string(pw),
|
||||
"smtp.gmail.com",
|
||||
)
|
||||
if err := smtp.SendMail("smtp.gmail.com:587", auth, "rsc@swtch.com", []string{"rsc@google.com"}, []byte(msg+time.LocalTime().String())); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
println("SENT")
|
||||
}
|
||||
*/
|
||||
468
vendor/github.com/mattermost/rsc/imap/mail.go
сгенерированный
поставляемый
Обычный файл
468
vendor/github.com/mattermost/rsc/imap/mail.go
сгенерированный
поставляемый
Обычный файл
@@ -0,0 +1,468 @@
|
||||
package imap
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"log"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Flags uint32
|
||||
|
||||
const (
|
||||
FlagJunk Flags = 1 << iota
|
||||
FlagNonJunk
|
||||
FlagReplied
|
||||
FlagFlagged
|
||||
FlagDeleted
|
||||
FlagDraft
|
||||
FlagRecent
|
||||
FlagSeen
|
||||
FlagNoInferiors
|
||||
FlagNoSelect
|
||||
FlagMarked
|
||||
FlagUnMarked
|
||||
FlagHasChildren
|
||||
FlagHasNoChildren
|
||||
FlagInbox // Gmail extension
|
||||
FlagAllMail // Gmail extension
|
||||
FlagDrafts // Gmail extension
|
||||
FlagSent // Gmail extension
|
||||
FlagSpam // Gmail extension
|
||||
FlagStarred // Gmail extension
|
||||
FlagTrash // Gmail extension
|
||||
FlagImportant // Gmail extension
|
||||
)
|
||||
|
||||
var flagNames = []string{
|
||||
"Junk",
|
||||
"NonJunk",
|
||||
"\\Answered",
|
||||
"\\Flagged",
|
||||
"\\Deleted",
|
||||
"\\Draft",
|
||||
"\\Recent",
|
||||
"\\Seen",
|
||||
"\\NoInferiors",
|
||||
"\\NoSelect",
|
||||
"\\Marked",
|
||||
"\\UnMarked",
|
||||
"\\HasChildren",
|
||||
"\\HasNoChildren",
|
||||
"\\Inbox",
|
||||
"\\AllMail",
|
||||
"\\Drafts",
|
||||
"\\Sent",
|
||||
"\\Spam",
|
||||
"\\Starred",
|
||||
"\\Trash",
|
||||
"\\Important",
|
||||
}
|
||||
|
||||
// A Box represents an IMAP mailbox.
|
||||
type Box struct {
|
||||
Name string // name of mailbox
|
||||
Elem string // last element in name
|
||||
Client *Client
|
||||
|
||||
parent *Box // parent in hierarchy
|
||||
child []*Box // child boxes
|
||||
dead bool // box no longer exists
|
||||
inbox bool // box is inbox
|
||||
flags Flags // allowed flags
|
||||
permFlags Flags // client-modifiable permanent flags
|
||||
readOnly bool // box is read-only
|
||||
|
||||
exists int // number of messages in box (according to server)
|
||||
maxSeen int // maximum message number seen (for polling)
|
||||
unseen int // number of first unseen message
|
||||
validity uint32 // UID validity base number
|
||||
load bool // if false, don't track full set of messages
|
||||
firstNum int // 0 means box not loaded
|
||||
msgByNum []*Msg
|
||||
msgByUID map[uint64]*Msg
|
||||
}
|
||||
|
||||
func (c *Client) Boxes() []*Box {
|
||||
c.data.lock()
|
||||
defer c.data.unlock()
|
||||
|
||||
box := make([]*Box, len(c.allBox))
|
||||
copy(box, c.allBox)
|
||||
return box
|
||||
}
|
||||
|
||||
func (c *Client) Box(name string) *Box {
|
||||
c.data.lock()
|
||||
defer c.data.unlock()
|
||||
|
||||
return c.boxByName[name]
|
||||
}
|
||||
|
||||
func (c *Client) Inbox() *Box {
|
||||
c.data.lock()
|
||||
defer c.data.unlock()
|
||||
|
||||
return c.inbox
|
||||
}
|
||||
|
||||
func (c *Client) newBox(name, sep string, inbox bool) *Box {
|
||||
c.data.mustBeLocked()
|
||||
if b := c.boxByName[name]; b != nil {
|
||||
return b
|
||||
}
|
||||
|
||||
b := &Box{
|
||||
Name: name,
|
||||
Elem: name,
|
||||
Client: c,
|
||||
inbox: inbox,
|
||||
}
|
||||
if !inbox {
|
||||
b.parent = c.rootBox
|
||||
}
|
||||
if !inbox && sep != "" && name != c.root {
|
||||
if i := strings.LastIndex(name, sep); i >= 0 {
|
||||
b.Elem = name[i+len(sep):]
|
||||
b.parent = c.newBox(name[:i], sep, false)
|
||||
}
|
||||
}
|
||||
c.allBox = append(c.allBox, b)
|
||||
c.boxByName[name] = b
|
||||
if b.parent != nil {
|
||||
b.parent.child = append(b.parent.child, b)
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// A Msg represents an IMAP message.
|
||||
type Msg struct {
|
||||
Box *Box // box containing message
|
||||
Date time.Time // date
|
||||
Flags Flags // message flags
|
||||
Bytes int64 // size in bytes
|
||||
Lines int64 // number of lines
|
||||
Hdr *MsgHdr // MIME header
|
||||
Root MsgPart // top-level message part
|
||||
GmailID uint64 // Gmail message id
|
||||
GmailThread uint64 // Gmail thread id
|
||||
UID uint64 // unique id for this message
|
||||
|
||||
deleted bool
|
||||
dead bool
|
||||
num int // message number in box (changes)
|
||||
}
|
||||
|
||||
// TODO: Return os.Error too
|
||||
|
||||
type byUID []*Msg
|
||||
|
||||
func (x byUID) Len() int { return len(x) }
|
||||
func (x byUID) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
|
||||
func (x byUID) Less(i, j int) bool { return x[i].UID < x[j].UID }
|
||||
|
||||
func (b *Box) Msgs() []*Msg {
|
||||
b.Client.data.lock()
|
||||
defer b.Client.data.unlock()
|
||||
|
||||
msgs := make([]*Msg, len(b.msgByUID))
|
||||
n := 0
|
||||
for _, m := range b.msgByUID {
|
||||
msgs[n] = m
|
||||
n++
|
||||
}
|
||||
sort.Sort(byUID(msgs))
|
||||
return msgs
|
||||
}
|
||||
|
||||
func (b *Box) newMsg(uid uint64, id int) *Msg {
|
||||
b.Client.data.mustBeLocked()
|
||||
if m := b.msgByUID[uid]; m != nil {
|
||||
return m
|
||||
}
|
||||
if b.msgByUID == nil {
|
||||
b.msgByUID = map[uint64]*Msg{}
|
||||
}
|
||||
m := &Msg{
|
||||
UID: uid,
|
||||
Box: b,
|
||||
num: id,
|
||||
}
|
||||
m.Root.Msg = m
|
||||
if b.load {
|
||||
if b.firstNum == 0 {
|
||||
b.firstNum = id
|
||||
}
|
||||
if id < b.firstNum {
|
||||
log.Printf("warning: unexpected id %d < %d", id, b.firstNum)
|
||||
byNum := make([]*Msg, len(b.msgByNum)+b.firstNum-id)
|
||||
copy(byNum[b.firstNum-id:], b.msgByNum)
|
||||
b.msgByNum = byNum
|
||||
b.firstNum = id
|
||||
}
|
||||
if id-b.firstNum < len(b.msgByNum) {
|
||||
b.msgByNum[id-b.firstNum] = m
|
||||
} else {
|
||||
if id-b.firstNum > len(b.msgByNum) {
|
||||
log.Printf("warning: unexpected id %d > %d", id, b.firstNum+len(b.msgByNum))
|
||||
byNum := make([]*Msg, id-b.firstNum)
|
||||
copy(byNum, b.msgByNum)
|
||||
b.msgByNum = byNum
|
||||
}
|
||||
b.msgByNum = append(b.msgByNum, m)
|
||||
}
|
||||
}
|
||||
b.msgByUID[uid] = m
|
||||
return m
|
||||
}
|
||||
|
||||
func (b *Box) Delete(msgs []*Msg) error {
|
||||
for _, m := range msgs {
|
||||
if m.Box != b {
|
||||
return fmt.Errorf("messages not from this box")
|
||||
}
|
||||
}
|
||||
b.Client.io.lock()
|
||||
defer b.Client.io.unlock()
|
||||
err := b.Client.deleteList(msgs)
|
||||
if err == nil {
|
||||
b.Client.data.lock()
|
||||
defer b.Client.data.unlock()
|
||||
for _, m := range msgs {
|
||||
if m.Flags&FlagDeleted != 0 {
|
||||
delete(b.msgByUID, m.UID)
|
||||
}
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (b *Box) Copy(msgs []*Msg) error {
|
||||
if len(msgs) == 0 {
|
||||
return nil
|
||||
}
|
||||
src := msgs[0].Box
|
||||
for _, m := range msgs {
|
||||
if m.Box != src {
|
||||
return fmt.Errorf("messages span boxes: %q and %q", src.Name, m.Box.Name)
|
||||
}
|
||||
}
|
||||
b.Client.io.lock()
|
||||
defer b.Client.io.unlock()
|
||||
return b.Client.copyList(b, src, msgs)
|
||||
}
|
||||
|
||||
func (b *Box) Mute(msgs []*Msg) error {
|
||||
if len(msgs) == 0 {
|
||||
return nil
|
||||
}
|
||||
for _, m := range msgs {
|
||||
if m.Box != b {
|
||||
return fmt.Errorf("messages not from this box")
|
||||
}
|
||||
}
|
||||
b.Client.io.lock()
|
||||
defer b.Client.io.unlock()
|
||||
return b.Client.muteList(b, msgs)
|
||||
}
|
||||
|
||||
func (b *Box) Check() error {
|
||||
b.Client.io.lock()
|
||||
defer b.Client.io.unlock()
|
||||
|
||||
return b.Client.check(b)
|
||||
}
|
||||
|
||||
func (m *Msg) Deleted() bool {
|
||||
// Racy but okay. Can add a lock later if it matters.
|
||||
return m.Flags&FlagDeleted != 0
|
||||
}
|
||||
|
||||
// A Hdr represents a message header.
|
||||
type MsgHdr struct {
|
||||
Date string
|
||||
Subject string
|
||||
From []Addr
|
||||
Sender []Addr
|
||||
ReplyTo []Addr
|
||||
To []Addr
|
||||
CC []Addr
|
||||
BCC []Addr
|
||||
InReplyTo string
|
||||
MessageID string
|
||||
Digest string
|
||||
}
|
||||
|
||||
// An Addr represents a single, named email address.
|
||||
// If Name is empty, only the email address is known.
|
||||
// If Email is empty, the Addr represents an unspecified (but named) group.
|
||||
type Addr struct {
|
||||
Name string
|
||||
Email string
|
||||
}
|
||||
|
||||
func (a Addr) String() string {
|
||||
if a.Email == "" {
|
||||
return a.Name
|
||||
}
|
||||
if a.Name == "" {
|
||||
return a.Email
|
||||
}
|
||||
return a.Name + " <" + a.Email + ">"
|
||||
}
|
||||
|
||||
// A MsgPart represents a single part of a MIME-encoded message.
|
||||
type MsgPart struct {
|
||||
Msg *Msg // containing message
|
||||
Type string
|
||||
ContentID string
|
||||
Desc string
|
||||
Encoding string
|
||||
Bytes int64
|
||||
Lines int64
|
||||
Charset string
|
||||
Name string
|
||||
Hdr *MsgHdr
|
||||
ID string
|
||||
Child []*MsgPart
|
||||
|
||||
raw []byte // raw message
|
||||
rawHeader []byte // raw RFC-2822 header, for message/rfc822
|
||||
rawBody []byte // raw RFC-2822 body, for message/rfc822
|
||||
mimeHeader []byte // mime header, for attachments
|
||||
}
|
||||
|
||||
func (p *MsgPart) newPart() *MsgPart {
|
||||
p.Msg.Box.Client.data.mustBeLocked()
|
||||
dot := "."
|
||||
if p.ID == "" { // no dot at root
|
||||
dot = ""
|
||||
}
|
||||
pp := &MsgPart{
|
||||
Msg: p.Msg,
|
||||
ID: fmt.Sprint(p.ID, dot, 1+len(p.Child)),
|
||||
}
|
||||
p.Child = append(p.Child, pp)
|
||||
return pp
|
||||
}
|
||||
|
||||
func (p *MsgPart) Text() []byte {
|
||||
c := p.Msg.Box.Client
|
||||
var raw []byte
|
||||
c.data.lock()
|
||||
if p == &p.Msg.Root {
|
||||
raw = p.rawBody
|
||||
c.data.unlock()
|
||||
if raw == nil {
|
||||
c.io.lock()
|
||||
if raw = p.rawBody; raw == nil {
|
||||
c.fetch(p, "TEXT")
|
||||
raw = p.rawBody
|
||||
}
|
||||
c.io.unlock()
|
||||
}
|
||||
} else {
|
||||
raw = p.raw
|
||||
c.data.unlock()
|
||||
if raw == nil {
|
||||
c.io.lock()
|
||||
if raw = p.raw; raw == nil {
|
||||
c.fetch(p, "")
|
||||
raw = p.raw
|
||||
}
|
||||
c.io.unlock()
|
||||
}
|
||||
}
|
||||
return decodeText(raw, p.Encoding, p.Charset, false)
|
||||
}
|
||||
|
||||
func (p *MsgPart) Raw() []byte {
|
||||
c := p.Msg.Box.Client
|
||||
var raw []byte
|
||||
c.data.lock()
|
||||
raw = p.rawBody
|
||||
c.data.unlock()
|
||||
if raw == nil {
|
||||
c.io.lock()
|
||||
if raw = p.rawBody; raw == nil {
|
||||
c.fetch(p, "")
|
||||
raw = p.rawBody
|
||||
}
|
||||
c.io.unlock()
|
||||
}
|
||||
return raw
|
||||
}
|
||||
|
||||
var sigDash = []byte("\n--\n")
|
||||
var quote = []byte("\n> ")
|
||||
var nl = []byte("\n")
|
||||
|
||||
var onwrote = regexp.MustCompile(`\A\s*On .* wrote:\s*\z`)
|
||||
|
||||
func (p *MsgPart) ShortText() []byte {
|
||||
t := p.Text()
|
||||
|
||||
return shortText(t)
|
||||
}
|
||||
|
||||
func shortText(t []byte) []byte {
|
||||
if t == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Cut signature.
|
||||
i := bytes.LastIndex(t, sigDash)
|
||||
j := bytes.LastIndex(t, quote)
|
||||
if i > j && bytes.Count(t[i+1:], nl) <= 10 {
|
||||
t = t[:i+1]
|
||||
}
|
||||
|
||||
// Cut trailing quoted text.
|
||||
for {
|
||||
rest, last := lastLine(t)
|
||||
trim := bytes.TrimSpace(last)
|
||||
if len(rest) < len(t) && (len(trim) == 0 || trim[0] == '>') {
|
||||
t = rest
|
||||
continue
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
// Cut 'On foo.*wrote:' line.
|
||||
rest, last := lastLine(t)
|
||||
if onwrote.Match(last) {
|
||||
t = rest
|
||||
}
|
||||
|
||||
// Cut trailing blank lines.
|
||||
for {
|
||||
rest, last := lastLine(t)
|
||||
trim := bytes.TrimSpace(last)
|
||||
if len(rest) < len(t) && len(trim) == 0 {
|
||||
t = rest
|
||||
continue
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
// Cut signature again.
|
||||
i = bytes.LastIndex(t, sigDash)
|
||||
j = bytes.LastIndex(t, quote)
|
||||
if i > j && bytes.Count(t[i+1:], nl) <= 10 {
|
||||
t = t[:i+1]
|
||||
}
|
||||
|
||||
return t
|
||||
}
|
||||
|
||||
func lastLine(t []byte) (rest, last []byte) {
|
||||
n := len(t)
|
||||
if n > 0 && t[n-1] == '\n' {
|
||||
n--
|
||||
}
|
||||
j := bytes.LastIndex(t[:n], nl)
|
||||
return t[:j+1], t[j+1:]
|
||||
}
|
||||
335
vendor/github.com/mattermost/rsc/imap/mail_test.go
сгенерированный
поставляемый
Обычный файл
335
vendor/github.com/mattermost/rsc/imap/mail_test.go
сгенерированный
поставляемый
Обычный файл
@@ -0,0 +1,335 @@
|
||||
package imap
|
||||
|
||||
import "testing"
|
||||
|
||||
var shortTextTests = []struct {
|
||||
in, out string
|
||||
}{
|
||||
{
|
||||
in: `From: Brad Fitzpatrick <bradfitz@golang.org>
|
||||
Date: Tue Oct 18 18:23:11 EDT 2011
|
||||
To: r@golang.org, golang-dev@googlegroups.com, reply@codereview.appspotmail.com
|
||||
Subject: Re: [golang-dev] code review 5307043: rpc: don't panic on write error. (issue 5307043)
|
||||
|
||||
Here's a test:
|
||||
|
||||
bradfitz@gopher:~/go/src/pkg/rpc$ hg diff
|
||||
diff -r b7f9a5e9b87f src/pkg/rpc/server_test.go
|
||||
--- a/src/pkg/rpc/server_test.go Tue Oct 18 17:01:42 2011 -0500
|
||||
+++ b/src/pkg/rpc/server_test.go Tue Oct 18 15:22:19 2011 -0700
|
||||
@@ -467,6 +467,27 @@
|
||||
fmt.Printf("mallocs per HTTP rpc round trip: %d\n",
|
||||
countMallocs(dialHTTP, t))
|
||||
}
|
||||
|
||||
+type writeCrasher struct{}
|
||||
+
|
||||
+func (writeCrasher) Close() os.Error {
|
||||
+ return nil
|
||||
+}
|
||||
+
|
||||
+func (writeCrasher) Read(p []byte) (int, os.Error) {
|
||||
+ return 0, os.EOF
|
||||
+}
|
||||
+
|
||||
+func (writeCrasher) Write(p []byte) (int, os.Error) {
|
||||
+ return 0, os.NewError("fake write failure")
|
||||
+}
|
||||
+
|
||||
+func TestClientWriteError(t *testing.T) {
|
||||
+ c := NewClient(writeCrasher{})
|
||||
+ res := false
|
||||
+ c.Call("foo", 1, &res)
|
||||
+}
|
||||
+
|
||||
func benchmarkEndToEnd(dial func() (*Client, os.Error), b *testing.B) {
|
||||
b.StopTimer()
|
||||
once.Do(startServer)
|
||||
|
||||
|
||||
On Tue, Oct 18, 2011 at 3:12 PM, <r@golang.org> wrote:
|
||||
|
||||
> Reviewers: golang-dev_googlegroups.com,
|
||||
>
|
||||
> Message:
|
||||
> Hello golang-dev@googlegroups.com,
|
||||
>
|
||||
> I'd like you to review this change to
|
||||
> https://go.googlecode.com/hg/
|
||||
>
|
||||
>
|
||||
> Description:
|
||||
> rpc: don't panic on write error.
|
||||
> The mechanism to record the error in the call is already in place.
|
||||
> Fixes issue 2382.
|
||||
>
|
||||
> Please review this at http://codereview.appspot.com/**5307043/<http://codereview.appspot.com/5307043/>
|
||||
>
|
||||
> Affected files:
|
||||
> M src/pkg/rpc/client.go
|
||||
>
|
||||
>
|
||||
> Index: src/pkg/rpc/client.go
|
||||
> ==============================**==============================**=======
|
||||
> --- a/src/pkg/rpc/client.go
|
||||
> +++ b/src/pkg/rpc/client.go
|
||||
> @@ -85,7 +85,8 @@
|
||||
> client.request.Seq = c.seq
|
||||
> client.request.ServiceMethod = c.ServiceMethod
|
||||
> if err := client.codec.WriteRequest(&**client.request, c.Args); err
|
||||
> != nil {
|
||||
> - panic("rpc: client encode error: " + err.String())
|
||||
> + c.Error = err
|
||||
> + c.done()
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> @@ -251,10 +252,10 @@
|
||||
> // the same Call object. If done is nil, Go will allocate a new channel.
|
||||
> // If non-nil, done must be buffered or Go will deliberately crash.
|
||||
> func (client *Client) Go(serviceMethod string, args interface{}, reply
|
||||
> interface{}, done chan *Call) *Call {
|
||||
> - c := new(Call)
|
||||
> - c.ServiceMethod = serviceMethod
|
||||
> - c.Args = args
|
||||
> - c.Reply = reply
|
||||
> + call := new(Call)
|
||||
> + call.ServiceMethod = serviceMethod
|
||||
> + call.Args = args
|
||||
> + call.Reply = reply
|
||||
> if done == nil {
|
||||
> done = make(chan *Call, 10) // buffered.
|
||||
> } else {
|
||||
> @@ -266,14 +267,14 @@
|
||||
> log.Panic("rpc: done channel is unbuffered")
|
||||
> }
|
||||
> }
|
||||
> - c.Done = done
|
||||
> + call.Done = done
|
||||
> if client.shutdown {
|
||||
> - c.Error = ErrShutdown
|
||||
> - c.done()
|
||||
> - return c
|
||||
> + call.Error = ErrShutdown
|
||||
> + call.done()
|
||||
> + return call
|
||||
> }
|
||||
> - client.send(c)
|
||||
> - return c
|
||||
> + client.send(call)
|
||||
> + return call
|
||||
> }
|
||||
>
|
||||
> // Call invokes the named function, waits for it to complete, and returns
|
||||
> its error status.
|
||||
>
|
||||
>
|
||||
>
|
||||
|
||||
`,
|
||||
out: `From: Brad Fitzpatrick <bradfitz@golang.org>
|
||||
Date: Tue Oct 18 18:23:11 EDT 2011
|
||||
To: r@golang.org, golang-dev@googlegroups.com, reply@codereview.appspotmail.com
|
||||
Subject: Re: [golang-dev] code review 5307043: rpc: don't panic on write error. (issue 5307043)
|
||||
|
||||
Here's a test:
|
||||
|
||||
bradfitz@gopher:~/go/src/pkg/rpc$ hg diff
|
||||
diff -r b7f9a5e9b87f src/pkg/rpc/server_test.go
|
||||
--- a/src/pkg/rpc/server_test.go Tue Oct 18 17:01:42 2011 -0500
|
||||
+++ b/src/pkg/rpc/server_test.go Tue Oct 18 15:22:19 2011 -0700
|
||||
@@ -467,6 +467,27 @@
|
||||
fmt.Printf("mallocs per HTTP rpc round trip: %d\n",
|
||||
countMallocs(dialHTTP, t))
|
||||
}
|
||||
|
||||
+type writeCrasher struct{}
|
||||
+
|
||||
+func (writeCrasher) Close() os.Error {
|
||||
+ return nil
|
||||
+}
|
||||
+
|
||||
+func (writeCrasher) Read(p []byte) (int, os.Error) {
|
||||
+ return 0, os.EOF
|
||||
+}
|
||||
+
|
||||
+func (writeCrasher) Write(p []byte) (int, os.Error) {
|
||||
+ return 0, os.NewError("fake write failure")
|
||||
+}
|
||||
+
|
||||
+func TestClientWriteError(t *testing.T) {
|
||||
+ c := NewClient(writeCrasher{})
|
||||
+ res := false
|
||||
+ c.Call("foo", 1, &res)
|
||||
+}
|
||||
+
|
||||
func benchmarkEndToEnd(dial func() (*Client, os.Error), b *testing.B) {
|
||||
b.StopTimer()
|
||||
once.Do(startServer)
|
||||
`,
|
||||
},
|
||||
{
|
||||
in: `From: David Symonds <dsymonds@golang.org>
|
||||
Date: Tue Oct 18 18:17:52 EDT 2011
|
||||
To: reply@codereview.appspotmail.com, r@golang.org, golang-dev@googlegroups.com
|
||||
Subject: Re: [golang-dev] code review 5307043: rpc: don't panic on write error. (issue 5307043)
|
||||
|
||||
LGTM
|
||||
On Oct 19, 2011 9:12 AM, <r@golang.org> wrote:
|
||||
|
||||
> Reviewers: golang-dev_googlegroups.com,
|
||||
>
|
||||
> Message:
|
||||
> Hello golang-dev@googlegroups.com,
|
||||
>
|
||||
> I'd like you to review this change to
|
||||
> https://go.googlecode.com/hg/
|
||||
>
|
||||
>
|
||||
> Description:
|
||||
> rpc: don't panic on write error.
|
||||
> The mechanism to record the error in the call is already in place.
|
||||
> Fixes issue 2382.
|
||||
>
|
||||
> Please review this at http://codereview.appspot.com/**5307043/<http://codereview.appspot.com/5307043/>
|
||||
>
|
||||
> Affected files:
|
||||
> M src/pkg/rpc/client.go
|
||||
>
|
||||
>
|
||||
> Index: src/pkg/rpc/client.go
|
||||
> ==============================**==============================**=======
|
||||
> --- a/src/pkg/rpc/client.go
|
||||
> +++ b/src/pkg/rpc/client.go
|
||||
> @@ -85,7 +85,8 @@
|
||||
> client.request.Seq = c.seq
|
||||
> client.request.ServiceMethod = c.ServiceMethod
|
||||
> if err := client.codec.WriteRequest(&**client.request, c.Args); err
|
||||
> != nil {
|
||||
> - panic("rpc: client encode error: " + err.String())
|
||||
> + c.Error = err
|
||||
> + c.done()
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> @@ -251,10 +252,10 @@
|
||||
> // the same Call object. If done is nil, Go will allocate a new channel.
|
||||
> // If non-nil, done must be buffered or Go will deliberately crash.
|
||||
> func (client *Client) Go(serviceMethod string, args interface{}, reply
|
||||
> interface{}, done chan *Call) *Call {
|
||||
> - c := new(Call)
|
||||
> - c.ServiceMethod = serviceMethod
|
||||
> - c.Args = args
|
||||
> - c.Reply = reply
|
||||
> + call := new(Call)
|
||||
> + call.ServiceMethod = serviceMethod
|
||||
> + call.Args = args
|
||||
> + call.Reply = reply
|
||||
> if done == nil {
|
||||
> done = make(chan *Call, 10) // buffered.
|
||||
> } else {
|
||||
> @@ -266,14 +267,14 @@
|
||||
> log.Panic("rpc: done channel is unbuffered")
|
||||
> }
|
||||
> }
|
||||
> - c.Done = done
|
||||
> + call.Done = done
|
||||
> if client.shutdown {
|
||||
> - c.Error = ErrShutdown
|
||||
> - c.done()
|
||||
> - return c
|
||||
> + call.Error = ErrShutdown
|
||||
> + call.done()
|
||||
> + return call
|
||||
> }
|
||||
> - client.send(c)
|
||||
> - return c
|
||||
> + client.send(call)
|
||||
> + return call
|
||||
> }
|
||||
>
|
||||
> // Call invokes the named function, waits for it to complete, and returns
|
||||
> its error status.
|
||||
>
|
||||
>
|
||||
>
|
||||
|
||||
`,
|
||||
out: `From: David Symonds <dsymonds@golang.org>
|
||||
Date: Tue Oct 18 18:17:52 EDT 2011
|
||||
To: reply@codereview.appspotmail.com, r@golang.org, golang-dev@googlegroups.com
|
||||
Subject: Re: [golang-dev] code review 5307043: rpc: don't panic on write error. (issue 5307043)
|
||||
|
||||
LGTM
|
||||
`,
|
||||
},
|
||||
{
|
||||
in: `From: Brad Fitzpatrick <bradfitz@golang.org>
|
||||
Date: Tue Oct 18 23:26:07 EDT 2011
|
||||
To: rsc@golang.org, golang-dev@googlegroups.com, reply@codereview.appspotmail.com
|
||||
Subject: Re: [golang-dev] code review 5297044: gotest: use $GCFLAGS like make does (issue 5297044)
|
||||
|
||||
LGTM
|
||||
|
||||
On Tue, Oct 18, 2011 at 7:52 PM, <rsc@golang.org> wrote:
|
||||
|
||||
> Reviewers: golang-dev_googlegroups.com,
|
||||
>
|
||||
> Message:
|
||||
> Hello golang-dev@googlegroups.com,
|
||||
>
|
||||
> I'd like you to review this change to
|
||||
> https://go.googlecode.com/hg/
|
||||
>
|
||||
>
|
||||
> Description:
|
||||
> gotest: use $GCFLAGS like make does
|
||||
>
|
||||
> Please review this at http://codereview.appspot.com/**5297044/<http://codereview.appspot.com/5297044/>
|
||||
>
|
||||
> Affected files:
|
||||
> M src/cmd/gotest/gotest.go
|
||||
>
|
||||
>
|
||||
> Index: src/cmd/gotest/gotest.go
|
||||
> ==============================**==============================**=======
|
||||
> --- a/src/cmd/gotest/gotest.go
|
||||
> +++ b/src/cmd/gotest/gotest.go
|
||||
> @@ -153,8 +153,12 @@
|
||||
> if gc == "" {
|
||||
> gc = O + "g"
|
||||
> }
|
||||
> - XGC = []string{gc, "-I", "_test", "-o", "_xtest_." + O}
|
||||
> - GC = []string{gc, "-I", "_test", "_testmain.go"}
|
||||
> + var gcflags []string
|
||||
> + if gf := strings.TrimSpace(os.Getenv("**GCFLAGS")); gf != "" {
|
||||
> + gcflags = strings.Fields(gf)
|
||||
> + }
|
||||
> + XGC = append([]string{gc, "-I", "_test", "-o", "_xtest_." + O},
|
||||
> gcflags...)
|
||||
> + GC = append(append([]string{gc, "-I", "_test"}, gcflags...),
|
||||
> "_testmain.go")
|
||||
> gl := os.Getenv("GL")
|
||||
> if gl == "" {
|
||||
> gl = O + "l"
|
||||
>
|
||||
>
|
||||
>
|
||||
`,
|
||||
out: `From: Brad Fitzpatrick <bradfitz@golang.org>
|
||||
Date: Tue Oct 18 23:26:07 EDT 2011
|
||||
To: rsc@golang.org, golang-dev@googlegroups.com, reply@codereview.appspotmail.com
|
||||
Subject: Re: [golang-dev] code review 5297044: gotest: use $GCFLAGS like make does (issue 5297044)
|
||||
|
||||
LGTM
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
||||
func TestShortText(t *testing.T) {
|
||||
for i, tt := range shortTextTests {
|
||||
if out := string(shortText([]byte(tt.in))); out != tt.out {
|
||||
t.Errorf("#%d: = %q, want %q\n", i, out, tt.out)
|
||||
}
|
||||
}
|
||||
}
|
||||
1739
vendor/github.com/mattermost/rsc/imap/rfc2045.txt
сгенерированный
поставляемый
Обычный файл
1739
vendor/github.com/mattermost/rsc/imap/rfc2045.txt
сгенерированный
поставляемый
Обычный файл
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
451
vendor/github.com/mattermost/rsc/imap/rfc2971.txt
сгенерированный
поставляемый
Обычный файл
451
vendor/github.com/mattermost/rsc/imap/rfc2971.txt
сгенерированный
поставляемый
Обычный файл
@@ -0,0 +1,451 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Network Working Group T. Showalter
|
||||
Request for Comments: 2971 Mirapoint, Inc.
|
||||
Category: Standards Track October 2000
|
||||
|
||||
|
||||
IMAP4 ID extension
|
||||
|
||||
Status of this Memo
|
||||
|
||||
This document specifies an Internet standards track protocol for the
|
||||
Internet community, and requests discussion and suggestions for
|
||||
improvements. Please refer to the current edition of the "Internet
|
||||
Official Protocol Standards" (STD 1) for the standardization state
|
||||
and status of this protocol. Distribution of this memo is unlimited.
|
||||
|
||||
Copyright Notice
|
||||
|
||||
Copyright (C) The Internet Society (2000). All Rights Reserved.
|
||||
|
||||
Abstract
|
||||
|
||||
The ID extension to the Internet Message Access Protocol - Version
|
||||
4rev1 (IMAP4rev1) protocol allows the server and client to exchange
|
||||
identification information on their implementation in order to make
|
||||
bug reports and usage statistics more complete.
|
||||
|
||||
1. Introduction
|
||||
|
||||
The IMAP4rev1 protocol described in [IMAP4rev1] provides a method for
|
||||
accessing remote mail stores, but it provides no facility to
|
||||
advertise what program a client or server uses to provide service.
|
||||
This makes it difficult for implementors to get complete bug reports
|
||||
from users, as it is frequently difficult to know what client or
|
||||
server is in use.
|
||||
|
||||
Additionally, some sites may wish to assemble usage statistics based
|
||||
on what clients are used, but in an an environment where users are
|
||||
permitted to obtain and maintain their own clients this is difficult
|
||||
to accomplish.
|
||||
|
||||
The ID command provides a facility to advertise information on what
|
||||
programs are being used along with contact information (should bugs
|
||||
ever occur).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Showalter Standards Track [Page 1]
|
||||
|
||||
RFC 2971 IMAP4 ID extension October 2000
|
||||
|
||||
|
||||
2. Conventions Used in this Document
|
||||
|
||||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
|
||||
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
|
||||
document are to be interpreted as described in [KEYWORDS].
|
||||
|
||||
The conventions used in this document are the same as specified in
|
||||
[IMAP4rev1]. In examples, "C:" and "S:" indicate lines sent by the
|
||||
client and server respectively. Line breaks have been inserted for
|
||||
readability.
|
||||
|
||||
3. Specification
|
||||
|
||||
The sole purpose of the ID extension is to enable clients and servers
|
||||
to exchange information on their implementations for the purposes of
|
||||
statistical analysis and problem determination.
|
||||
|
||||
This information is be submitted to a server by any client wishing to
|
||||
provide information for statistical purposes, provided the server
|
||||
advertises its willingness to take the information with the atom "ID"
|
||||
included in the list of capabilities returned by the CAPABILITY
|
||||
command.
|
||||
|
||||
Implementations MUST NOT make operational changes based on the data
|
||||
sent as part of the ID command or response. The ID command is for
|
||||
human consumption only, and is not to be used in improving the
|
||||
performance of clients or servers.
|
||||
|
||||
This includes, but is not limited to, the following:
|
||||
|
||||
Servers MUST NOT attempt to work around client bugs by using
|
||||
information from the ID command. Clients MUST NOT attempt to work
|
||||
around server bugs based on the ID response.
|
||||
|
||||
Servers MUST NOT provide features to a client or otherwise
|
||||
optimize for a particular client by using information from the ID
|
||||
command. Clients MUST NOT provide features to a server or
|
||||
otherwise optimize for a particular server based on the ID
|
||||
response.
|
||||
|
||||
Servers MUST NOT deny access to or refuse service for a client
|
||||
based on information from the ID command. Clients MUST NOT refuse
|
||||
to operate or limit their operation with a server based on the ID
|
||||
response.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Showalter Standards Track [Page 2]
|
||||
|
||||
RFC 2971 IMAP4 ID extension October 2000
|
||||
|
||||
|
||||
Rationale: It is imperative that this extension not supplant IMAP's
|
||||
CAPABILITY mechanism with a ad-hoc approach where implementations
|
||||
guess each other's features based on who they claim to be.
|
||||
|
||||
Implementations MUST NOT send false information in an ID command.
|
||||
|
||||
Implementations MAY send less information than they have available or
|
||||
no information at all. Such behavior may be useful to preserve user
|
||||
privacy. See Security Considerations, section 7.
|
||||
|
||||
3.1. ID Command
|
||||
|
||||
Arguments: client parameter list or NIL
|
||||
|
||||
Responses: OPTIONAL untagged response: ID
|
||||
|
||||
Result: OK identification information accepted
|
||||
BAD command unknown or arguments invalid
|
||||
|
||||
Implementation identification information is sent by the client with
|
||||
the ID command.
|
||||
|
||||
This command is valid in any state.
|
||||
|
||||
The information sent is in the form of a list of field/value pairs.
|
||||
Fields are permitted to be any IMAP4 string, and values are permitted
|
||||
to be any IMAP4 string or NIL. A value of NIL indicates that the
|
||||
client can not or will not specify this information. The client may
|
||||
also send NIL instead of the list, indicating that it wants to send
|
||||
no information, but would still accept a server response.
|
||||
|
||||
The available fields are defined in section 3.3.
|
||||
|
||||
Example: C: a023 ID ("name" "sodr" "version" "19.34" "vendor"
|
||||
"Pink Floyd Music Limited")
|
||||
S: * ID NIL
|
||||
S: a023 OK ID completed
|
||||
|
||||
3.2. ID Response
|
||||
|
||||
Contents: server parameter list
|
||||
|
||||
In response to an ID command issued by the client, the server replies
|
||||
with a tagged response containing information on its implementation.
|
||||
The format is the same as the client list.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Showalter Standards Track [Page 3]
|
||||
|
||||
RFC 2971 IMAP4 ID extension October 2000
|
||||
|
||||
|
||||
Example: C: a042 ID NIL
|
||||
S: * ID ("name" "Cyrus" "version" "1.5" "os" "sunos"
|
||||
"os-version" "5.5" "support-url"
|
||||
"mailto:cyrus-bugs+@andrew.cmu.edu")
|
||||
S: a042 OK ID command completed
|
||||
|
||||
A server MUST send a tagged ID response to an ID command. However, a
|
||||
server MAY send NIL in place of the list.
|
||||
|
||||
3.3. Defined Field Values
|
||||
|
||||
Any string may be sent as a field, but the following are defined to
|
||||
describe certain values that might be sent. Implementations are free
|
||||
to send none, any, or all of these. Strings are not case-sensitive.
|
||||
Field strings MUST NOT be longer than 30 octets. Value strings MUST
|
||||
NOT be longer than 1024 octets. Implementations MUST NOT send more
|
||||
than 30 field-value pairs.
|
||||
|
||||
name Name of the program
|
||||
version Version number of the program
|
||||
os Name of the operating system
|
||||
os-version Version of the operating system
|
||||
vendor Vendor of the client/server
|
||||
support-url URL to contact for support
|
||||
address Postal address of contact/vendor
|
||||
date Date program was released, specified as a date-time
|
||||
in IMAP4rev1
|
||||
command Command used to start the program
|
||||
arguments Arguments supplied on the command line, if any
|
||||
if any
|
||||
environment Description of environment, i.e., UNIX environment
|
||||
variables or Windows registry settings
|
||||
|
||||
Implementations MUST NOT use contact information to submit automatic
|
||||
bug reports. Implementations may include information from an ID
|
||||
response in a report automatically prepared, but are prohibited from
|
||||
sending the report without user authorization.
|
||||
|
||||
It is preferable to find the name and version of the underlying
|
||||
operating system at runtime in cases where this is possible.
|
||||
|
||||
Information sent via an ID response may violate user privacy. See
|
||||
Security Considerations, section 7.
|
||||
|
||||
Implementations MUST NOT send the same field name more than once.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Showalter Standards Track [Page 4]
|
||||
|
||||
RFC 2971 IMAP4 ID extension October 2000
|
||||
|
||||
|
||||
4. Formal Syntax
|
||||
|
||||
This syntax is intended to augment the grammar specified in
|
||||
[IMAP4rev1] in order to provide for the ID command. This
|
||||
specification uses the augmented Backus-Naur Form (BNF) notation as
|
||||
used in [IMAP4rev1].
|
||||
|
||||
command_any ::= "CAPABILITY" / "LOGOUT" / "NOOP" / x_command / id
|
||||
;; adds id command to command_any in [IMAP4rev1]
|
||||
|
||||
id ::= "ID" SPACE id_params_list
|
||||
|
||||
id_response ::= "ID" SPACE id_params_list
|
||||
|
||||
id_params_list ::= "(" #(string SPACE nstring) ")" / nil
|
||||
;; list of field value pairs
|
||||
|
||||
response_data ::= "*" SPACE (resp_cond_state / resp_cond_bye /
|
||||
mailbox_data / message_data / capability_data / id_response)
|
||||
|
||||
5. Use of the ID extension with Firewalls and Other Intermediaries
|
||||
|
||||
There exist proxies, firewalls, and other intermediary systems that
|
||||
can intercept an IMAP session and make changes to the data exchanged
|
||||
in the session. Such intermediaries are not anticipated by the IMAP4
|
||||
protocol design and are not within the scope of the IMAP4 standard.
|
||||
However, in order for the ID command to be useful in the presence of
|
||||
such intermediaries, those intermediaries need to take special note
|
||||
of the ID command and response. In particular, if an intermediary
|
||||
changes any part of the IMAP session it must also change the ID
|
||||
command to advertise its presence.
|
||||
|
||||
A firewall MAY act to block transmission of specific information
|
||||
fields in the ID command and response that it believes reveal
|
||||
information that could expose a security vulnerability. However, a
|
||||
firewall SHOULD NOT disable the extension, when present, entirely,
|
||||
and SHOULD NOT unconditionally remove either the client or server
|
||||
list.
|
||||
|
||||
Finally, it should be noted that a firewall, when handling a
|
||||
CAPABILITY response, MUST NOT allow the names of extensions to be
|
||||
returned to the client that the firewall has no knowledge of.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Showalter Standards Track [Page 5]
|
||||
|
||||
RFC 2971 IMAP4 ID extension October 2000
|
||||
|
||||
|
||||
6. References
|
||||
|
||||
[KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
|
||||
Requirement Levels", RFC 2119, March 1997.
|
||||
|
||||
[IMAP4rev1] Crispin, M., "Internet Message Access Protocol - Version
|
||||
4rev1", RFC 2060, October 1996.
|
||||
|
||||
[RFC-822] Crocker, D., "Standard for the Format of ARPA Internet
|
||||
Text Messages", STD 11, RFC 822, August 1982.
|
||||
|
||||
7. Security Considerations
|
||||
|
||||
This extension has the danger of violating the privacy of users if
|
||||
misused. Clients and servers should notify users that they implement
|
||||
and enable the ID command.
|
||||
|
||||
It is highly desirable that implementations provide a method of
|
||||
disabling ID support, perhaps by not sending ID at all, or by sending
|
||||
NIL as the argument to the ID command or response.
|
||||
|
||||
Implementors must exercise extreme care in adding fields sent as part
|
||||
of an ID command or response. Some fields, including a processor ID
|
||||
number, Ethernet address, or other unique (or mostly unique)
|
||||
identifier allow tracking of users in ways that violate user privacy
|
||||
expectations.
|
||||
|
||||
Having implementation information of a given client or server may
|
||||
make it easier for an attacker to gain unauthorized access due to
|
||||
security holes.
|
||||
|
||||
Since this command includes arbitrary data and does not require the
|
||||
user to authenticate, server implementations are cautioned to guard
|
||||
against an attacker sending arbitrary garbage data in order to fill
|
||||
up the ID log. In particular, if a server naively logs each ID
|
||||
command to disk without inspecting it, an attacker can simply fire up
|
||||
thousands of connections and send a few kilobytes of random data.
|
||||
Servers have to guard against this. Methods include truncating
|
||||
abnormally large responses; collating responses by storing only a
|
||||
single copy, then keeping a counter of the number of times that
|
||||
response has been seen; keeping only particularly interesting parts
|
||||
of responses; and only logging responses of users who actually log
|
||||
in.
|
||||
|
||||
Security is affected by firewalls which modify the IMAP protocol
|
||||
stream; see section 5, Use of the ID Extension with Firewalls and
|
||||
Other Intermediaries, for more information.
|
||||
|
||||
|
||||
|
||||
|
||||
Showalter Standards Track [Page 6]
|
||||
|
||||
RFC 2971 IMAP4 ID extension October 2000
|
||||
|
||||
|
||||
8. Author's Address
|
||||
|
||||
Tim Showalter
|
||||
Mirapoint, Inc.
|
||||
909 Hermosa Ct.
|
||||
Sunnyvale, CA 94095
|
||||
|
||||
EMail: tjs@mirapoint.com
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Showalter Standards Track [Page 7]
|
||||
|
||||
RFC 2971 IMAP4 ID extension October 2000
|
||||
|
||||
|
||||
9. Full Copyright Statement
|
||||
|
||||
Copyright (C) The Internet Society (2000). All Rights Reserved.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain it
|
||||
or assist in its implementation may be prepared, copied, published
|
||||
and distributed, in whole or in part, without restriction of any
|
||||
kind, provided that the above copyright notice and this paragraph are
|
||||
included on all such copies and derivative works. However, this
|
||||
document itself may not be modified in any way, such as by removing
|
||||
the copyright notice or references to the Internet Society or other
|
||||
Internet organizations, except as needed for the purpose of
|
||||
developing Internet standards in which case the procedures for
|
||||
copyrights defined in the Internet Standards process must be
|
||||
followed, or as required to translate it into languages other than
|
||||
English.
|
||||
|
||||
The limited permissions granted above are perpetual and will not be
|
||||
revoked by the Internet Society or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on an
|
||||
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
|
||||
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
|
||||
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
Acknowledgement
|
||||
|
||||
Funding for the RFC Editor function is currently provided by the
|
||||
Internet Society.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Showalter Standards Track [Page 8]
|
||||
|
||||
6051
vendor/github.com/mattermost/rsc/imap/rfc3501.txt
сгенерированный
поставляемый
Обычный файл
6051
vendor/github.com/mattermost/rsc/imap/rfc3501.txt
сгенерированный
поставляемый
Обычный файл
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
350
vendor/github.com/mattermost/rsc/imap/sx.go
сгенерированный
поставляемый
Обычный файл
350
vendor/github.com/mattermost/rsc/imap/sx.go
сгенерированный
поставляемый
Обычный файл
@@ -0,0 +1,350 @@
|
||||
package imap
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
type sxKind int
|
||||
|
||||
const (
|
||||
sxNone sxKind = iota
|
||||
sxAtom
|
||||
sxString
|
||||
sxNumber
|
||||
sxList
|
||||
)
|
||||
|
||||
type sx struct {
|
||||
kind sxKind
|
||||
data []byte
|
||||
number int64
|
||||
sx []*sx
|
||||
}
|
||||
|
||||
func rdsx(b *bufio.Reader) (*sx, error) {
|
||||
x := &sx{kind: sxList}
|
||||
for {
|
||||
xx, err := rdsx1(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if xx == nil {
|
||||
break
|
||||
}
|
||||
x.sx = append(x.sx, xx)
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
func rdsx1(b *bufio.Reader) (*sx, error) {
|
||||
c, err := b.ReadByte()
|
||||
if c == ' ' {
|
||||
c, err = b.ReadByte()
|
||||
}
|
||||
if c == '\r' {
|
||||
c, err = b.ReadByte()
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if c == '\n' {
|
||||
return nil, nil
|
||||
}
|
||||
if c == ')' { // end of list
|
||||
b.UnreadByte()
|
||||
return nil, nil
|
||||
}
|
||||
if c == '(' { // parenthesized list
|
||||
x, err := rdsx(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
c, err = b.ReadByte()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if c != ')' {
|
||||
// oops! not good
|
||||
b.UnreadByte()
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
if c == '{' { // length-prefixed string
|
||||
n := 0
|
||||
for {
|
||||
c, _ = b.ReadByte()
|
||||
if c < '0' || c > '9' {
|
||||
break
|
||||
}
|
||||
n = n*10 + int(c) - '0'
|
||||
}
|
||||
if c != '}' {
|
||||
// oops! not good
|
||||
b.UnreadByte()
|
||||
}
|
||||
c, err = b.ReadByte()
|
||||
if c != '\r' {
|
||||
// oops! not good
|
||||
}
|
||||
c, err = b.ReadByte()
|
||||
if c != '\n' {
|
||||
// oops! not good
|
||||
}
|
||||
data := make([]byte, n)
|
||||
if _, err := io.ReadFull(b, data); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &sx{kind: sxString, data: data}, nil
|
||||
}
|
||||
if c == '"' { // quoted string
|
||||
var data []byte
|
||||
for {
|
||||
c, err = b.ReadByte()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if c == '"' {
|
||||
break
|
||||
}
|
||||
if c == '\\' {
|
||||
c, _ = b.ReadByte()
|
||||
}
|
||||
data = append(data, c)
|
||||
}
|
||||
return &sx{kind: sxString, data: data}, nil
|
||||
}
|
||||
if '0' <= c && c <= '9' { // number
|
||||
n := int64(c) - '0'
|
||||
for {
|
||||
c, err := b.ReadByte()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if c < '0' || c > '9' {
|
||||
break
|
||||
}
|
||||
n = n*10 + int64(c) - '0'
|
||||
}
|
||||
b.UnreadByte()
|
||||
return &sx{kind: sxNumber, number: n}, nil
|
||||
}
|
||||
|
||||
// atom
|
||||
nbr := 0
|
||||
var data []byte
|
||||
data = append(data, c)
|
||||
for {
|
||||
c, err = b.ReadByte()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if c <= ' ' || c == '(' || c == ')' || c == '{' || c == '}' {
|
||||
break
|
||||
}
|
||||
if c == '[' {
|
||||
// allow embedded brackets as in BODY[]
|
||||
if data[0] == '[' {
|
||||
break
|
||||
}
|
||||
nbr++
|
||||
}
|
||||
if c == ']' {
|
||||
if nbr <= 0 {
|
||||
break
|
||||
}
|
||||
nbr--
|
||||
}
|
||||
data = append(data, c)
|
||||
}
|
||||
if c != ' ' {
|
||||
b.UnreadByte()
|
||||
}
|
||||
return &sx{kind: sxAtom, data: data}, nil
|
||||
}
|
||||
|
||||
func (x *sx) ok() bool {
|
||||
return len(x.sx) >= 2 && x.sx[1].kind == sxAtom && strings.EqualFold(string(x.sx[1].data), "ok")
|
||||
}
|
||||
|
||||
func (x *sx) String() string {
|
||||
var b bytes.Buffer
|
||||
x.fmt(&b, true)
|
||||
return b.String()
|
||||
}
|
||||
|
||||
func (x *sx) fmt(b *bytes.Buffer, paren bool) {
|
||||
if x == nil {
|
||||
return
|
||||
}
|
||||
switch x.kind {
|
||||
case sxAtom, sxString:
|
||||
fmt.Fprintf(b, "%q", x.data)
|
||||
case sxNumber:
|
||||
fmt.Fprintf(b, "%d", x.number)
|
||||
case sxList:
|
||||
if paren {
|
||||
b.WriteByte('(')
|
||||
}
|
||||
for i, xx := range x.sx {
|
||||
if i > 0 {
|
||||
b.WriteByte(' ')
|
||||
}
|
||||
xx.fmt(b, paren)
|
||||
}
|
||||
if paren {
|
||||
b.WriteByte(')')
|
||||
}
|
||||
default:
|
||||
b.WriteByte('?')
|
||||
}
|
||||
}
|
||||
|
||||
var bytesNIL = []byte("NIL")
|
||||
|
||||
var fmtKind = []sxKind{
|
||||
'L': sxList,
|
||||
'S': sxString,
|
||||
'N': sxNumber,
|
||||
'A': sxAtom,
|
||||
}
|
||||
|
||||
func (x *sx) match(format string) bool {
|
||||
done := false
|
||||
c := format[0]
|
||||
for i := 0; i < len(x.sx); i++ {
|
||||
if !done {
|
||||
if i >= len(format) {
|
||||
log.Printf("sxmatch: too short")
|
||||
return false
|
||||
}
|
||||
if format[i] == '*' {
|
||||
done = true
|
||||
} else {
|
||||
c = format[i]
|
||||
}
|
||||
}
|
||||
xx := x.sx[i]
|
||||
if xx.kind == sxAtom && xx.isNil() {
|
||||
if c == 'L' {
|
||||
xx.kind = sxList
|
||||
xx.data = nil
|
||||
} else if c == 'S' {
|
||||
xx.kind = sxString
|
||||
xx.data = nil
|
||||
}
|
||||
}
|
||||
if xx.kind == sxAtom && c == 'S' {
|
||||
xx.kind = sxString
|
||||
}
|
||||
if xx.kind != fmtKind[c] {
|
||||
log.Printf("sxmatch: %s not %c", xx, c)
|
||||
return false
|
||||
}
|
||||
}
|
||||
if len(format) > len(x.sx) {
|
||||
log.Printf("sxmatch: too long")
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func (x *sx) isAtom(name string) bool {
|
||||
if x == nil || x.kind != sxAtom {
|
||||
return false
|
||||
}
|
||||
data := x.data
|
||||
n := len(name)
|
||||
if n > 0 && name[n-1] == '[' {
|
||||
i := bytes.IndexByte(data, '[')
|
||||
if i < 0 {
|
||||
return false
|
||||
}
|
||||
data = data[:i]
|
||||
name = name[:n-1]
|
||||
}
|
||||
for i := 0; i < len(name); i++ {
|
||||
if i >= len(data) || lwr(rune(data[i])) != lwr(rune(name[i])) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return len(name) == len(data)
|
||||
}
|
||||
|
||||
func (x *sx) isString() bool {
|
||||
if x.isNil() {
|
||||
return true
|
||||
}
|
||||
if x.kind == sxAtom {
|
||||
x.kind = sxString
|
||||
}
|
||||
return x.kind == sxString
|
||||
}
|
||||
|
||||
func (x *sx) isNumber() bool {
|
||||
return x.kind == sxNumber
|
||||
}
|
||||
|
||||
func (x *sx) isNil() bool {
|
||||
return x == nil ||
|
||||
x.kind == sxList && len(x.sx) == 0 ||
|
||||
x.kind == sxAtom && bytes.Equal(x.data, bytesNIL)
|
||||
}
|
||||
|
||||
func (x *sx) isList() bool {
|
||||
return x.isNil() || x.kind == sxList
|
||||
}
|
||||
|
||||
func (x *sx) parseFlags() Flags {
|
||||
if x.kind != sxList {
|
||||
log.Printf("malformed flags: %s", x)
|
||||
return 0
|
||||
}
|
||||
|
||||
f := Flags(0)
|
||||
SX:
|
||||
for _, xx := range x.sx {
|
||||
if xx.kind != sxAtom {
|
||||
continue
|
||||
}
|
||||
for i, name := range flagNames {
|
||||
if xx.isAtom(name) {
|
||||
f |= 1 << uint(i)
|
||||
continue SX
|
||||
}
|
||||
}
|
||||
if Debug {
|
||||
log.Printf("unknown flag: %v", xx)
|
||||
}
|
||||
}
|
||||
return f
|
||||
}
|
||||
|
||||
func (x *sx) parseDate() time.Time {
|
||||
if x.kind != sxString {
|
||||
log.Printf("malformed date: %s", x)
|
||||
return time.Time{}
|
||||
}
|
||||
|
||||
t, err := time.Parse("02-Jan-2006 15:04:05 -0700", string(x.data))
|
||||
if err != nil {
|
||||
log.Printf("malformed date: %s (%s)", x, err)
|
||||
}
|
||||
return t
|
||||
}
|
||||
|
||||
func (x *sx) nstring() string {
|
||||
return string(x.nbytes())
|
||||
}
|
||||
|
||||
func (x *sx) nbytes() []byte {
|
||||
if x.isNil() {
|
||||
return nil
|
||||
}
|
||||
return x.data
|
||||
}
|
||||
60
vendor/github.com/mattermost/rsc/imap/sx_test.go
сгенерированный
поставляемый
Обычный файл
60
vendor/github.com/mattermost/rsc/imap/sx_test.go
сгенерированный
поставляемый
Обычный файл
@@ -0,0 +1,60 @@
|
||||
package imap
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"reflect"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
var sxTests = []struct {
|
||||
in string
|
||||
out *sx
|
||||
}{
|
||||
{"1234", &sx{kind: sxNumber, number: 1234}},
|
||||
{"hello", &sx{kind: sxAtom, data: []byte("hello")}},
|
||||
{"hello[world]", &sx{kind: sxAtom, data: []byte("hello[world]")}},
|
||||
{`"h\\ello"`, &sx{kind: sxString, data: []byte(`h\ello`)}},
|
||||
{"{6}\r\nh\\ello", &sx{kind: sxString, data: []byte(`h\ello`)}},
|
||||
{`(hello "world" (again) ())`,
|
||||
&sx{
|
||||
kind: sxList,
|
||||
sx: []*sx{
|
||||
&sx{
|
||||
kind: sxAtom,
|
||||
data: []byte("hello"),
|
||||
},
|
||||
&sx{
|
||||
kind: sxString,
|
||||
data: []byte("world"),
|
||||
},
|
||||
&sx{
|
||||
kind: sxList,
|
||||
sx: []*sx{
|
||||
&sx{
|
||||
kind: sxAtom,
|
||||
data: []byte("again"),
|
||||
},
|
||||
},
|
||||
},
|
||||
&sx{
|
||||
kind: sxList,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
func TestSx(t *testing.T) {
|
||||
for _, tt := range sxTests {
|
||||
b := bufio.NewReader(strings.NewReader(tt.in + "\n"))
|
||||
sx, err := rdsx1(b)
|
||||
if err != nil {
|
||||
t.Errorf("parse %s: %v", tt.in, err)
|
||||
continue
|
||||
}
|
||||
if !reflect.DeepEqual(sx, tt.out) {
|
||||
t.Errorf("rdsx1(%s) = %v, want %v", tt.in, sx, tt.out)
|
||||
}
|
||||
}
|
||||
}
|
||||
602
vendor/github.com/mattermost/rsc/imap/tcs.go
сгенерированный
поставляемый
Обычный файл
602
vendor/github.com/mattermost/rsc/imap/tcs.go
сгенерированный
поставляемый
Обычный файл
@@ -0,0 +1,602 @@
|
||||
package imap
|
||||
|
||||
// NOTE(rsc): These belong elsewhere but the existing charset
|
||||
// packages seem too complicated.
|
||||
|
||||
var tab_iso8859_1 = [256]rune{
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
|
||||
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
|
||||
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
|
||||
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
|
||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
|
||||
}
|
||||
|
||||
var tab_iso8859_2 = [256]rune{
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
|
||||
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
|
||||
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
|
||||
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0x00a0, 0x0104, 0x02d8, 0x0141, 0x00a4, 0x013d, 0x015a, 0x00a7,
|
||||
0x00a8, 0x0160, 0x015e, 0x0164, 0x0179, 0x00ad, 0x017d, 0x017b,
|
||||
0x00b0, 0x0105, 0x02db, 0x0142, 0x00b4, 0x013e, 0x015b, 0x02c7,
|
||||
0x00b8, 0x0161, 0x015f, 0x0165, 0x017a, 0x02dd, 0x017e, 0x017c,
|
||||
0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7,
|
||||
0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e,
|
||||
0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7,
|
||||
0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df,
|
||||
0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7,
|
||||
0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f,
|
||||
0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7,
|
||||
0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9,
|
||||
}
|
||||
|
||||
var tab_iso8859_3 = [256]rune{
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
|
||||
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
|
||||
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
|
||||
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0x00a0, 0x0126, 0x02d8, 0x00a3, 0x00a4, -1, 0x0124, 0x00a7,
|
||||
0x00a8, 0x0130, 0x015e, 0x011e, 0x0134, 0x00ad, -1, 0x017b,
|
||||
0x00b0, 0x0127, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x0125, 0x00b7,
|
||||
0x00b8, 0x0131, 0x015f, 0x011f, 0x0135, 0x00bd, -1, 0x017c,
|
||||
0x00c0, 0x00c1, 0x00c2, -1, 0x00c4, 0x010a, 0x0108, 0x00c7,
|
||||
0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
|
||||
-1, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x0120, 0x00d6, 0x00d7,
|
||||
0x011c, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x016c, 0x015c, 0x00df,
|
||||
0x00e0, 0x00e1, 0x00e2, -1, 0x00e4, 0x010b, 0x0109, 0x00e7,
|
||||
0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
|
||||
-1, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x0121, 0x00f6, 0x00f7,
|
||||
0x011d, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x016d, 0x015d, 0x02d9,
|
||||
}
|
||||
|
||||
var tab_iso8859_4 = [256]rune{
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
|
||||
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
|
||||
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
|
||||
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0x00a0, 0x0104, 0x0138, 0x0156, 0x00a4, 0x0128, 0x013b, 0x00a7,
|
||||
0x00a8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00ad, 0x017d, 0x00af,
|
||||
0x00b0, 0x0105, 0x02db, 0x0157, 0x00b4, 0x0129, 0x013c, 0x02c7,
|
||||
0x00b8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014a, 0x017e, 0x014b,
|
||||
0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e,
|
||||
0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x012a,
|
||||
0x0110, 0x0145, 0x014c, 0x0136, 0x00d4, 0x00d5, 0x00d6, 0x00d7,
|
||||
0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x0168, 0x016a, 0x00df,
|
||||
0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f,
|
||||
0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x012b,
|
||||
0x0111, 0x0146, 0x014d, 0x0137, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
|
||||
0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x0169, 0x016b, 0x02d9,
|
||||
}
|
||||
|
||||
var tab_iso8859_5 = [256]rune{
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
|
||||
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
|
||||
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
|
||||
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0x00a0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407,
|
||||
0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x00ad, 0x040e, 0x040f,
|
||||
0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
|
||||
0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f,
|
||||
0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
|
||||
0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f,
|
||||
0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
|
||||
0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f,
|
||||
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
|
||||
0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f,
|
||||
0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457,
|
||||
0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x00a7, 0x045e, 0x045f,
|
||||
}
|
||||
|
||||
var tab_iso8859_6 = [256]rune{
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
|
||||
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
|
||||
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
|
||||
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0x00a0, -1, -1, -1, 0x00a4, -1, -1, -1,
|
||||
-1, -1, -1, -1, 0x060c, 0x00ad, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, 0x061b, -1, -1, -1, 0x061f,
|
||||
-1, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627,
|
||||
0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f,
|
||||
0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637,
|
||||
0x0638, 0x0639, 0x063a, -1, -1, -1, -1, -1,
|
||||
0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647,
|
||||
0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f,
|
||||
0x0650, 0x0651, 0x0652, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
}
|
||||
|
||||
var tab_iso8859_7 = [256]rune{
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
|
||||
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
|
||||
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
|
||||
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0x00a0, 0x2018, 0x2019, 0x00a3, -1, -1, 0x00a6, 0x00a7,
|
||||
0x00a8, 0x00a9, -1, 0x00ab, 0x00ac, 0x00ad, -1, 0x2015,
|
||||
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x0384, 0x0385, 0x0386, 0x00b7,
|
||||
0x0388, 0x0389, 0x038a, 0x00bb, 0x038c, 0x00bd, 0x038e, 0x038f,
|
||||
0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
|
||||
0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f,
|
||||
0x03a0, 0x03a1, -1, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7,
|
||||
0x03a8, 0x03a9, 0x03aa, 0x03ab, 0x03ac, 0x03ad, 0x03ae, 0x03af,
|
||||
0x03b0, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7,
|
||||
0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf,
|
||||
0x03c0, 0x03c1, 0x03c2, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7,
|
||||
0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, -1,
|
||||
}
|
||||
|
||||
var tab_iso8859_8 = [256]rune{
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
|
||||
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
|
||||
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
|
||||
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0x00a0, -1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7,
|
||||
0x00a8, 0x00a9, 0x00d7, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x203e,
|
||||
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
|
||||
0x00b8, 0x00b9, 0x00f7, 0x00bb, 0x00bc, 0x00bd, 0x00be, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, 0x2017,
|
||||
0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7,
|
||||
0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df,
|
||||
0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7,
|
||||
0x05e8, 0x05e9, 0x05ea, -1, -1, -1, -1, -1,
|
||||
}
|
||||
|
||||
var tab_iso8859_9 = [256]rune{
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
|
||||
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
|
||||
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
|
||||
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7,
|
||||
0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
|
||||
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
|
||||
0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
|
||||
0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7,
|
||||
0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
|
||||
0x011e, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7,
|
||||
0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0130, 0x015e, 0x00df,
|
||||
0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7,
|
||||
0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
|
||||
0x011f, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
|
||||
0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0131, 0x015f, 0x00ff,
|
||||
}
|
||||
|
||||
var tab_iso8859_10 = [256]rune{
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
|
||||
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
|
||||
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
|
||||
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0x00a0, 0x0104, 0x0112, 0x0122, 0x012a, 0x0128, 0x0136, 0x00a7,
|
||||
0x013b, 0x0110, 0x0160, 0x0166, 0x017d, 0x00ad, 0x016a, 0x014a,
|
||||
0x00b0, 0x0105, 0x0113, 0x0123, 0x012b, 0x0129, 0x0137, 0x00b7,
|
||||
0x013c, 0x0110, 0x0161, 0x0167, 0x017e, 0x2014, 0x016b, 0x014b,
|
||||
0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e,
|
||||
0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x00cf,
|
||||
0x00d0, 0x0145, 0x014c, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x0168,
|
||||
0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df,
|
||||
0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f,
|
||||
0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x00ef,
|
||||
0x00f0, 0x0146, 0x014d, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x0169,
|
||||
0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x0138,
|
||||
}
|
||||
|
||||
var tab_iso8859_15 = [256]rune{
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
|
||||
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
|
||||
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
|
||||
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0x20ac, 0xa5, 0x0160, 0xa7, 0x0161, 0xa9, 0xaa, 0xab, 0xac, 0xad,
|
||||
0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0x017d, 0xb5, 0xb6, 0xb7, 0x017e, 0xb9, 0xba, 0xbb,
|
||||
0x0152, 0x0153, 0x0178, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9,
|
||||
0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8,
|
||||
0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
|
||||
0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6,
|
||||
0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
|
||||
}
|
||||
|
||||
var tab_koi8 = [256]rune{
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
|
||||
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
|
||||
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
|
||||
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433,
|
||||
0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e,
|
||||
0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432,
|
||||
0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a,
|
||||
0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413,
|
||||
0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e,
|
||||
0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
|
||||
0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a,
|
||||
}
|
||||
|
||||
var tab_cp1250 = [256]rune{
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
|
||||
0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
|
||||
0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
|
||||
0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
|
||||
0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
|
||||
0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
|
||||
0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
|
||||
0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
|
||||
0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
|
||||
0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
|
||||
0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
|
||||
0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
|
||||
0x20AC, -1, 0x201A, -1, 0x201E, 0x2026, 0x2020, 0x2021,
|
||||
-1, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179,
|
||||
-1, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
|
||||
-1, 0x2122, 0x0161, 0x203A, 0x015B, 0x0165, 0x017E, 0x017A,
|
||||
0x00A0, 0x02C7, 0x02D8, 0x0141, 0x00A4, 0x0104, 0x00A6, 0x00A7,
|
||||
0x00A8, 0x00A9, 0x015E, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x017B,
|
||||
0x00B0, 0x00B1, 0x02DB, 0x0142, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
|
||||
0x00B8, 0x0105, 0x015F, 0x00BB, 0x013D, 0x02DD, 0x013E, 0x017C,
|
||||
0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7,
|
||||
0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E,
|
||||
0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7,
|
||||
0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF,
|
||||
0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7,
|
||||
0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
|
||||
0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7,
|
||||
0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9,
|
||||
}
|
||||
var tab_cp1251 = [256]rune{
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
|
||||
0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
|
||||
0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
|
||||
0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
|
||||
0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
|
||||
0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
|
||||
0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
|
||||
0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
|
||||
0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
|
||||
0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
|
||||
0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
|
||||
0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
|
||||
0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021,
|
||||
0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F,
|
||||
0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
|
||||
-1, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F,
|
||||
0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7,
|
||||
0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407,
|
||||
0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7,
|
||||
0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457,
|
||||
0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
|
||||
0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
|
||||
0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
|
||||
0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
|
||||
0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
|
||||
0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
|
||||
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
|
||||
0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
|
||||
}
|
||||
var tab_cp1252 = [256]rune{
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
|
||||
0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
|
||||
0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
|
||||
0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
|
||||
0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
|
||||
0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
|
||||
0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
|
||||
0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
|
||||
0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
|
||||
0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
|
||||
0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
|
||||
0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
|
||||
0x20AC, -1, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
|
||||
0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, -1, 0x017D, -1,
|
||||
-1, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
|
||||
0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, -1, 0x017E, 0x0178,
|
||||
0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
|
||||
0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
|
||||
0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
|
||||
0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
|
||||
0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
|
||||
0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
|
||||
0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
|
||||
0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
|
||||
0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
|
||||
0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
|
||||
0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
|
||||
0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF,
|
||||
}
|
||||
var tab_cp1253 = [256]rune{
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
|
||||
0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
|
||||
0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
|
||||
0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
|
||||
0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
|
||||
0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
|
||||
0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
|
||||
0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
|
||||
0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
|
||||
0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
|
||||
0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
|
||||
0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
|
||||
0x20AC, -1, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
|
||||
-1, 0x2030, -1, 0x2039, -1, -1, -1, -1,
|
||||
-1, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
|
||||
-1, 0x2122, -1, 0x203A, -1, -1, -1, -1,
|
||||
0x00A0, 0x0385, 0x0386, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
|
||||
0x00A8, 0x00A9, -1, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x2015,
|
||||
0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x00B5, 0x00B6, 0x00B7,
|
||||
0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F,
|
||||
0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
|
||||
0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
|
||||
0x03A0, 0x03A1, -1, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7,
|
||||
0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
|
||||
0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
|
||||
0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
|
||||
0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
|
||||
0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, -1,
|
||||
}
|
||||
var tab_cp1254 = [256]rune{
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
|
||||
0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
|
||||
0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
|
||||
0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
|
||||
0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
|
||||
0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
|
||||
0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
|
||||
0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
|
||||
0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
|
||||
0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
|
||||
0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
|
||||
0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
|
||||
0x20AC, -1, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
|
||||
0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, -1, -1, -1,
|
||||
-1, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
|
||||
0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, -1, -1, 0x0178,
|
||||
0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
|
||||
0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
|
||||
0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
|
||||
0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
|
||||
0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
|
||||
0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
|
||||
0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
|
||||
0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF,
|
||||
0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
|
||||
0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
|
||||
0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
|
||||
0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF,
|
||||
}
|
||||
var tab_cp1255 = [256]rune{
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
|
||||
0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
|
||||
0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
|
||||
0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
|
||||
0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
|
||||
0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
|
||||
0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
|
||||
0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
|
||||
0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
|
||||
0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
|
||||
0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
|
||||
0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
|
||||
0x20AC, -1, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
|
||||
0x02C6, 0x2030, -1, 0x2039, -1, -1, -1, -1,
|
||||
-1, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
|
||||
0x02DC, 0x2122, -1, 0x203A, -1, -1, -1, -1,
|
||||
0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AA, 0x00A5, 0x00A6, 0x00A7,
|
||||
0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
|
||||
0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
|
||||
0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
|
||||
0x05B0, 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7,
|
||||
0x05B8, 0x05B9, -1, 0x05BB, 0x05BC, 0x05BD, 0x05BE, 0x05BF,
|
||||
0x05C0, 0x05C1, 0x05C2, 0x05C3, 0x05F0, 0x05F1, 0x05F2, 0x05F3,
|
||||
0x05F4, -1, -1, -1, -1, -1, -1, -1,
|
||||
0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
|
||||
0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
|
||||
0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
|
||||
0x05E8, 0x05E9, 0x05EA, -1, -1, 0x200E, 0x200F, -1,
|
||||
}
|
||||
var tab_cp1256 = [256]rune{
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
|
||||
0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
|
||||
0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
|
||||
0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
|
||||
0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
|
||||
0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
|
||||
0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
|
||||
0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
|
||||
0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
|
||||
0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
|
||||
0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
|
||||
0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
|
||||
0x20AC, 0x067E, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
|
||||
0x02C6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688,
|
||||
0x06AF, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
|
||||
0x06A9, 0x2122, 0x0691, 0x203A, 0x0153, 0x200C, 0x200D, 0x06BA,
|
||||
0x00A0, 0x060C, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
|
||||
0x00A8, 0x00A9, 0x06BE, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
|
||||
0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
|
||||
0x00B8, 0x00B9, 0x061B, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x061F,
|
||||
0x06C1, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627,
|
||||
0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F,
|
||||
0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x00D7,
|
||||
0x0637, 0x0638, 0x0639, 0x063A, 0x0640, 0x0641, 0x0642, 0x0643,
|
||||
0x00E0, 0x0644, 0x00E2, 0x0645, 0x0646, 0x0647, 0x0648, 0x00E7,
|
||||
0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0649, 0x064A, 0x00EE, 0x00EF,
|
||||
0x064B, 0x064C, 0x064D, 0x064E, 0x00F4, 0x064F, 0x0650, 0x00F7,
|
||||
0x0651, 0x00F9, 0x0652, 0x00FB, 0x00FC, 0x200E, 0x200F, 0x06D2,
|
||||
}
|
||||
var tab_cp1257 = [256]rune{
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
|
||||
0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
|
||||
0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
|
||||
0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
|
||||
0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
|
||||
0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
|
||||
0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
|
||||
0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
|
||||
0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
|
||||
0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
|
||||
0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
|
||||
0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
|
||||
0x20AC, -1, 0x201A, -1, 0x201E, 0x2026, 0x2020, 0x2021,
|
||||
-1, 0x2030, -1, 0x2039, -1, 0x00A8, 0x02C7, 0x00B8,
|
||||
-1, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
|
||||
-1, 0x2122, -1, 0x203A, -1, 0x00AF, 0x02DB, -1,
|
||||
0x00A0, -1, 0x00A2, 0x00A3, 0x00A4, -1, 0x00A6, 0x00A7,
|
||||
0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6,
|
||||
0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
|
||||
0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6,
|
||||
0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112,
|
||||
0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B,
|
||||
0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7,
|
||||
0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF,
|
||||
0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113,
|
||||
0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C,
|
||||
0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7,
|
||||
0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x02D9,
|
||||
}
|
||||
var tab_cp1258 = [256]rune{
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
|
||||
0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
|
||||
0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
|
||||
0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
|
||||
0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
|
||||
0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
|
||||
0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
|
||||
0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
|
||||
0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
|
||||
0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
|
||||
0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
|
||||
0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
|
||||
0x20AC, -1, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
|
||||
0x02C6, 0x2030, -1, 0x2039, 0x0152, -1, -1, -1,
|
||||
-1, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
|
||||
0x02DC, 0x2122, -1, 0x203A, 0x0153, -1, -1, 0x0178,
|
||||
0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
|
||||
0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
|
||||
0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
|
||||
0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
|
||||
0x00C0, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
|
||||
0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x0300, 0x00CD, 0x00CE, 0x00CF,
|
||||
0x0110, 0x00D1, 0x0309, 0x00D3, 0x00D4, 0x01A0, 0x00D6, 0x00D7,
|
||||
0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x01AF, 0x0303, 0x00DF,
|
||||
0x00E0, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
|
||||
0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0301, 0x00ED, 0x00EE, 0x00EF,
|
||||
0x0111, 0x00F1, 0x0323, 0x00F3, 0x00F4, 0x01A1, 0x00F6, 0x00F7,
|
||||
0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x01B0, 0x20AB, 0x00FF,
|
||||
}
|
||||
Ссылка в новой задаче
Block a user