mirror of
https://github.com/documize/community.git
synced 2025-07-20 13:49:42 +02:00
Bump version to 5.11.0
This commit is contained in:
parent
a32510b8e6
commit
510e1bd0bd
370 changed files with 18825 additions and 5454 deletions
21
vendor/github.com/microsoft/go-mssqldb/ucs22str_32bit.go
generated
vendored
Normal file
21
vendor/github.com/microsoft/go-mssqldb/ucs22str_32bit.go
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
//go:build arm || 386 || mips || mipsle
|
||||
// +build arm 386 mips mipsle
|
||||
|
||||
package mssql
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"unicode/utf16"
|
||||
)
|
||||
|
||||
func ucs22str(s []byte) (string, error) {
|
||||
if len(s)%2 != 0 {
|
||||
return "", fmt.Errorf("illegal UCS2 string length: %d", len(s))
|
||||
}
|
||||
buf := make([]uint16, len(s)/2)
|
||||
for i := 0; i < len(s); i += 2 {
|
||||
buf[i/2] = binary.LittleEndian.Uint16(s[i:])
|
||||
}
|
||||
return string(utf16.Decode(buf)), nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue