This document is for Kombu's development version, which can be significantly different from previous releases. Get the stable docs here: 5.0.
String Encoding Utilities - kombu.utils.encoding
¶
Text encoding utilities.
Utilities to encode text, and to safely emit text from running
applications without crashing from the infamous
UnicodeDecodeError
exception.
- kombu.utils.encoding.default_encoding_file = None¶
safe_str takes encoding from this file by default.
set_default_encoding_file()
can used to set the default output file.
- kombu.utils.encoding.safe_repr(o, errors='replace')[source]¶
Safe form of repr, void of Unicode errors.
- kombu.utils.encoding.safe_str(s, errors='replace')[source]¶
Safe form of str(), void of unicode errors.