This commit is contained in:
John
2019-04-03 00:03:46 +08:00
parent 8a8fea1257
commit c4c7e6caf4
297 changed files with 5215 additions and 5350 deletions

View File

@ -18,7 +18,7 @@ const (
// The Encoder or Decoder should have output a substitute character.
INVALID_CHAR
// NO_ROOM means there were not enough input bytes to form a complete character,
// NO_ROOM means there were not enough input bytes to form a complete character,
// or there was not enough room in the output buffer to write a complete character.
// No bytes were written, and no internal state was changed in the Encoder or Decoder.
NO_ROOM
@ -52,7 +52,7 @@ type Charset struct {
NewEncoder func() Encoder
}
// The charsets are stored in charsets under their canonical names.
// The charsets are stored in charsets under their canonical names.
var charsets = make(map[string]*Charset)
// aliases maps their aliases to their canonical names.

View File

@ -155,7 +155,7 @@ func EntityDecoder() Decoder {
// This table is copied from /src/pkg/html/escape.go in the Go source
//
// These replacements permit compatibility with old numeric entities that
// These replacements permit compatibility with old numeric entities that
// assumed Windows-1252 encoding.
// http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#consume-a-character-reference
var replacementTable = [...]rune{
@ -191,6 +191,6 @@ var replacementTable = [...]rune{
'\u009D',
'\u017E',
'\u0178', // Last entry is 0x9F.
// 0x00->'\uFFFD' is handled programmatically.
// 0x00->'\uFFFD' is handled programmatically.
// 0x0D->'\u000D' is a no-op.
}

View File

@ -1,8 +1,8 @@
package main
import (
"github.com/gogf/gf/third/github.com/axgle/mahonia"
"flag"
"github.com/gogf/gf/third/github.com/axgle/mahonia"
"io"
"log"
"os"

View File

@ -19,7 +19,7 @@ type MBCSTable struct {
fromUnicode map[rune]string
}
// AddCharacter adds a character to the table. rune is its Unicode code point,
// AddCharacter adds a character to the table. rune is its Unicode code point,
// and bytes contains the bytes used to encode it in the character set.
func (table *MBCSTable) AddCharacter(c rune, bytes string) {
if table.fromUnicode == nil {