code: def can_encode(self, encoding, char):
          
          available_map = {}
          try:
              available_map = self._get_codepage_char_map(encoding)
          except LookupError:
              return False
  
          # Decide whether this character is encodeable in this code page
          is_ascii = ord(char) < 128
          is_encodable = char in available_map
          return is_ascii or is_encodable
docs: Determine if a character is encodeable in the given code page.
  
          :param encoding: The name of the encoding.
          :param char: The character to attempt to encode.