pydicom.values.convert_single_string

pydicom.values.convert_single_string(byte_string, encodings=None)

Return decoded text, ignoring backslashes.

Parameters
  • byte_string (bytes or str) – The encoded text.

  • encodings (list of str, optional) – A list of the character encoding schemes used to encode the text.

Returns

  • unicode or list of unicode – The decoded text if in Python 2.

  • str or list of str – The decoded text if in Python 3.