2.3.18.1.3. util.utf8_to_unicode

util.utf8_to_unicode(f)

Decorator that converts string arguments to Unicode. Assumes that strings contains ASCII or UTF-8. All other argument types are passed through untouched.

A UnicodeDecodeError raised here means that the wrapped function was called with a string argument that did not contain ASCII or UTF-8. In such a case, the user is required to convert the string to Unicode before passing it to the function.

Related Topics