from typing import Any, TextIO

default_encoding_file: TextIO | None

def bytes_to_str(s: bytes | str) -> str: ...
def str_to_bytes(s: str | bytes) -> bytes: ...
def ensure_bytes(s: str | bytes) -> bytes: ...
def from_utf8(s: str | bytes, *args: Any, **kwargs: Any) -> str: ...
def default_encode(obj: Any) -> bytes: ...
def default_encoding(file: TextIO | None = ...) -> str: ...
def get_default_encoding_file() -> TextIO | None: ...
def set_default_encoding_file(file: TextIO | None) -> None: ...
def safe_str(s: Any, errors: str = ...) -> str: ...
def safe_repr(o: Any, errors: str = ...) -> str: ...
