def setencoding():
 encoding = 'ascii'
 if 0:
  import locale
  loc = locale.getdefaultlocale()
  if loc[1]:
   encoding = loc[1]
 if 0:
  encoding = 'undefined'
 if (encoding != 'ascii'):
  sys.setdefaultencoding(encoding)

def setencoding ( ) : encoding = 'ascii' if 0 : import locale loc = locale . getdefaultlocale ( ) if loc [ 1 ] : encoding = loc [ 1 ] if 0 : encoding = 'undefined' if ( encoding != 'ascii' ) : sys . setdefaultencoding ( encoding )
set the string encoding used by the unicode implementation .