encodings.search_function
Prev: encodings.normalize_encoding | Up: encodings
Rel: encodings.CodecRegistryError, encodings.normalize_encoding
Ref: docs.python.org — encodings.search_function
Tags: #public #python3 #stdlib #encodings
Import
import encodings
from encodings import search_function
Signature & Overview
encodings.search_function(encoding)
encodings.search_function() function.
Usage
import encodings
info = encodings.search_function("utf-8")
assert info is not None and info.name == "utf-8"
Gotchas
- Prefer
codecs.lookup(name):codecs.lookup()also checks custom codecs registered viacodecs.register().
REPL Inspect
from encodings import search_function
help(search_function)
Linked from
Related notes
- tuts/python3/stdlib_module/encodings/CodecRegistryError Linked here; links to this page; shared tags: #encodings, #stdlib
- tuts/python3/stdlib_module/encodings/normalize_encoding Linked here; links to this page; shared tags: #encodings, #stdlib
- tuts/python3/stdlib_module/encodings Linked here; links to this page; shared tags: #stdlib
- tuts/c/stdlib shared tags: #stdlib
- tuts/c/stdlib/assert shared tags: #stdlib
- tuts/c/stdlib/assert/assert shared tags: #stdlib
- tuts/c/stdlib/assert/static_assert shared tags: #stdlib
- tuts/c/stdlib/ctype shared tags: #stdlib
- tuts/c/stdlib/ctype/isalpha shared tags: #stdlib
- tuts/c/stdlib/ctype/isdigit shared tags: #stdlib