Files
httprunner/hrp/pkg/utf7/utf7.go
余泓铮 3b4367cac4 Feat/yuhongzheng/pre auto install
* fix: fix rotate tap swipe error
* fix: default input frequency from 60 to 10
* fix: error getting window size during screen rotation
* fix: kuake input unicode error
* feat: android input by appium ime
* feat: android swipe and tap with duration
* fix: format import file
* fix: format import file
* feat: 新增按控件点击,获取设备应用,修改日志获取
* feat: 新增ui2控件点击
* fix: format file
* fix: format file
* Merge branch 'video-release' into 'feat/yuhongzheng/pre_auto_install'
* merge
* Merge branch 'feat/yuhongzheng/pre_auto_install' of…
* fix: close reader
* Merge branch 'video-release' into 'feat/yuhongzheng/pre_auto_install'
* fix: format code
* Merge branch 'feat/yuhongzheng/pre_auto_install' of…
* fix: test send key

https://code.byted.org/iesqa/httprunner/merge_requests/34
2024-05-10 07:02:41 +00:00

35 lines
749 B
Go

// Package utf7 implements modified UTF-7 encoding defined in RFC 3501 section 5.1.3
package utf7
import (
"encoding/base64"
"golang.org/x/text/encoding"
)
const (
min = 0x20 // Minimum self-representing UTF-7 value
max = 0x7E // Maximum self-representing UTF-7 value
repl = '\uFFFD' // Unicode replacement code point
)
var b64Enc = base64.NewEncoding("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+,")
type enc struct{}
func (e enc) NewDecoder() *encoding.Decoder {
return &encoding.Decoder{
Transformer: &decoder{true},
}
}
func (e enc) NewEncoder() *encoding.Encoder {
return &encoding.Encoder{
Transformer: &encoder{},
}
}
// Encoding is the modified UTF-7 encoding.
var Encoding encoding.Encoding = enc{}