forked from warthog618/sms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.go
39 lines (34 loc) · 865 Bytes
/
default.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// SPDX-License-Identifier: MIT
//
// Copyright © 2018 Kent Gibson <[email protected]>.
package charset
var (
defaultDecoder Decoder
defaultExtDecoder = Decoder{
0x0a: '\f',
0x0d: '\n',
0x14: '^',
0x28: '{',
0x29: '}',
0x2f: '\\',
0x3c: '[',
0x3d: '~',
0x3e: ']',
0x40: '|',
0x65: '€',
}
defaultEncoder Encoder
defaultExtEncoder Encoder
defaultRunes = []rune(
"@£$¥èéùìòÇ\nØø\rÅåΔ_ΦΓΛΩΠΨΣΘΞ\x1bÆæßÉ !\"#¤%&'()*+,-./0123456789:;<=>?" +
"¡ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÑܧ¿abcdefghijklmnopqrstuvwxyzäöñüà")
)
func generateDefaultEncoder() Encoder {
return generateEncoderFromRunes(defaultRunes)
}
func generateDefaultDecoder() Decoder {
return generateDecoderFromRunes(defaultRunes)
}
func generateDefaultExtEncoder() Encoder {
return generateEncoder(defaultExtDecoder)
}