Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/axgle/mahonia
/ functions
Functions
63 in github.com/axgle/mahonia
⨍
Functions
63
◇
Types & classes
10
↓ 28 callers
Function
gb18030Linear
Data tables for 4-byte characters in GB18030 encoding. Based on http://source.icu-project.org/repos/icu/data/trunk/charset/data/ucm/gb-18030-2005.ucm
gb18030-data.go:9
↓ 9 callers
Function
RegisterCharset
RegisterCharset adds a charset to the charsetMap.
charset.go:80
↓ 8 callers
Method
AddCharacter
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.
mbcs.go:24
↓ 6 callers
Function
NewDecoder
NewDecoder returns a Decoder to decode the named charset. If the name is not found, it returns nil.
charset.go:97
↓ 5 callers
Function
simplifyName
simplifyName converts a name to lower case and removes non-alphanumeric characters. This is how the names are used as keys to the maps.
charset.go:63
↓ 3 callers
Method
ConvertString
ConvertString converts a string from UTF-8 to e's encoding.
convert_string.go:4
↓ 3 callers
Method
fill
fill reads a new chunk into the buffer.
reader.go:38
↓ 2 callers
Method
Decoder
()
mbcs.go:44
↓ 2 callers
Method
Encoder
()
mbcs.go:74
↓ 2 callers
Function
FallbackDecoder
FallbackDecoder combines a series of Decoders into one. If the first Decoder returns a status of INVALID_CHAR, the others are tried as well. Note: if
fallback.go:9
↓ 2 callers
Function
GetCharset
GetCharset fetches a charset by name. If the name is not found, it returns nil.
charset.go:91
↓ 2 callers
Function
NewEncoder
NewEncoder returns an Encoder to encode the named charset.
charset.go:106
↓ 2 callers
Method
NewReader
NewReader creates a new Reader that uses the receiver to decode text.
reader.go:29
↓ 2 callers
Method
NewWriter
NewWriter creates a new Writer that uses the receiver to encode text.
writer.go:17
↓ 2 callers
Method
Write
Write encodes and writes the data from p.
writer.go:25
↓ 2 callers
Method
WriteRune
(c rune)
writer.go:79
↓ 2 callers
Function
doubleLength
(b []byte)
translate.go:46
↓ 2 callers
Method
unpack
()
8bit.go:91
↓ 1 callers
Method
ConvertString
ConvertString converts a string from d's encoding to UTF-8.
convert_string.go:31
↓ 1 callers
Function
EntityDecoder
EntityDecoder returns a Decoder that decodes HTML character entities. If there is no valid character entity at the current position, it returns INVALI
entity.go:46
↓ 1 callers
Method
Read
Read reads data into p. It returns the number of bytes read into p. It calls Read at most once on the underlying Reader, hence n may be less than len(
reader.go:59
↓ 1 callers
Method
Translate
Translate enables a Decoder to implement go-charset's Translator interface.
translate.go:6
↓ 1 callers
Function
encodeUTF16beRune
(p []byte, c rune)
utf16.go:99
↓ 1 callers
Method
register
()
8bit.go:32
Method
ReadRune
ReadRune reads a single Unicode character and returns the rune and its size in bytes.
reader.go:125
Function
TestDecode
(t *testing.T)
mahonia_test.go:68
Function
TestDecodeTranslate
(t *testing.T)
mahonia_test.go:84
Function
TestEncode
(t *testing.T)
mahonia_test.go:101
Function
TestEntities
(t *testing.T)
mahonia_test.go:165
Function
TestFallback
(t *testing.T)
mahonia_test.go:155
Function
TestReader
(t *testing.T)
mahonia_test.go:117
Function
TestSimplifyName
(t *testing.T)
mahonia_test.go:16
Function
TestWriter
(t *testing.T)
mahonia_test.go:136
Function
buildEntityTrie
()
entity.go:19
Function
buildGB18030Tables
()
gb18030.go:149
Function
decodeASCIIRune
(p []byte)
ASCII.go:26
Function
decodeBig5Rune
(p []byte)
big5.go:23
Function
decodeGB18030Rune
(p []byte)
gb18030.go:23
Function
decodeGBKRune
(p []byte)
gbk.go:17
Function
decodeLatin1Rune
(p []byte)
ASCII.go:54
Function
decodeUTF16beRune
(p []byte)
utf16.go:72
Function
decodeUTF16leRune
(p []byte)
utf16.go:122
Function
decodeUTF8Rune
(p []byte)
utf8.go:13
Function
encodeASCIIRune
(p []byte, c rune)
ASCII.go:39
Function
encodeBig5Rune
(p []byte, r rune)
big5.go:48
Function
encodeGB18030Rune
(p []byte, r rune)
gb18030.go:83
Function
encodeGBKRune
(p []byte, r rune)
gbk.go:46
Function
encodeLatin1Rune
(p []byte, c rune)
ASCII.go:63
Function
encodeUTF16leRune
(p []byte, c rune)
utf16.go:149
Function
encodeUTF8Rune
(p []byte, c rune)
utf8.go:38
Function
init
Converters for GB18030 encoding.
gb18030.go:9
Function
init
()
big5.go:9
Function
init
()
8bit.go:108
Function
init
Converters for GBK encoding.
gbk.go:5
Function
init
()
shiftjis.go:9
Function
init
()
utf16.go:7
Function
init
Converters for ASCII and ISO-8859-1
ASCII.go:5
Function
init
()
utf8.go:5
Function
init
()
euc-jp.go:9
Function
main
()
mahoniconv/mahoniconv.go:16
Function
makeEUCJPTable
()
euc-jp.go:27
Function
makeSjisTable
()
shiftjis.go:28
Function
reverseBig5Table
()
big5.go:81