code: def text_to_data(self, text, elt, ps):
          '''convert text into typecode specific data.
          Encode all strings as UTF-8, which will be type 'str'
          not 'unicode'
          '''
          if self.strip: text = text.strip()
          if self.pyclass is not None:
              return self.pyclass(text.encode(UNICODE_ENCODING))
          return text.encode(UNICODE_ENCODINGf text_to_data(self, text, elt, ps):
          '''convert text into typecode specific data.
          Encode all strings as UTF-8, which will be type 'str'
          not 'unicode'
          '''
          if self.strip: text = text.strip()
          if self.pyclass is not None:
              return self.pyclass(text.encode(UNICODE_ENCODING))
          return text.encode(UNICODE_ENCODING)
docs: convert text into typecode specific data.
          Encode all strings as UTF-8, which will be type 'str'
          not 'unicode'