This document describes the current stable version of Kombu (5.0). For development docs, go here.
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.