def _harden_stdout():
    """Ensure that unprintable output to STDOUT does not cause encoding errors; use XML character references
  so any kind of output gets a chance to render in a decipherable way."""
global _sys_TRM
_sys.stdout = _sys_TRM = _sys_io.TextIOWrapper(_sys.stdout.buffer, encoding
    =_sys.stdout.encoding, errors='xmlcharrefreplace', line_buffering=true)
_harden_stdout()
Как я могу преобразовать Unicode в верхний регистр, чтобы напечатать его?