code: def _salt_cloud_force_ascii(exc):
      '''
      Helper method to try its best to convert any Unicode text into ASCII
      without stack tracing since salt internally does not handle Unicode strings
  
      This method is not supposed to be used directly. Once
      `py:module: salt.utils.cloud` is imported this method register's with
      python's codecs module for proper automatic conversion in case of encoding
      errors.
      '''
      if not isinstance(exc, (UnicodeEncodeError, UnicodeTranslateError)):
          raise TypeError('Can\'t handle {0}'.format(exc))
  
      unicode_trans = {
          # Convert non-breaking space to space
          u'\xa0': u' ',
          # Convert en dash to dash
          u'\u2013': u'-',
      }
  
      if exc.object[exc.start:exc.end] in unicode_trans:
          return unicode_trans[exc.object[exc.start:exc.end]], exc.end
  
      # There's nothing else we can do, raise the exception
      raise exf _salt_cloud_force_ascii(exc):
      '''
      Helper method to try its best to convert any Unicode text into ASCII
      without stack tracing since salt internally does not handle Unicode strings
  
      This method is not supposed to be used directly. Once
      `py:module: salt.utils.cloud` is imported this method register's with
      python's codecs module for proper automatic conversion in case of encoding
      errors.
      '''
      if not isinstance(exc, (UnicodeEncodeError, UnicodeTranslateError)):
          raise TypeError('Can\'t handle {0}'.format(exc))
  
      unicode_trans = {
          # Convert non-breaking space to space
          u'\xa0': u' ',
          # Convert en dash to dash
          u'\u2013': u'-',
      }
  
      if exc.object[exc.start:exc.end] in unicode_trans:
          return unicode_trans[exc.object[exc.start:exc.end]], exc.end
  
      # There's nothing else we can do, raise the exception
      raise exc
docs: Helper method to try its best to convert any Unicode text into ASCII
      without stack tracing since salt internally does not handle Unicode strings
  
      This method is not supposed to be used directly. Once
      `py:module: salt.utils.cloud` is imported this method register's with
      python's codecs module for proper automatic conversion in case of encoding
      errors.