Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ encode
Function
encode
Lib/encodings/utf_8_sig.py:14–16 ·
view source on GitHub ↗
(input, errors='strict')
Source
from the content-addressed store, hash-verified
12
### Codec APIs
13
14
def
encode(input, errors=
'strict'
):
15
return
(codecs.BOM_UTF8 + codecs.utf_8_encode(input, errors)[0],
16
len(input))
17
18
def
decode(input, errors=
'strict'
):
19
prefix = 0
Callers
3
encode
Method · 0.70
test_raw_encode
Method · 0.50
test_raw_encode
Method · 0.50
Calls
1
len
Function · 0.85
Tested by
2
test_raw_encode
Method · 0.40
test_raw_encode
Method · 0.40