EdinburghGenomics / pyclarity-lims

Python interface to the GenoLogics LIMS server via its REST API.
MIT License
11 stars 5 forks source link

Support for different file encodings #10

Closed mwhamgenomics closed 7 years ago

mwhamgenomics commented 7 years ago

We should be able to read utf-16-encoded files, e.g. from the Spectramax. requests can return text with any encoding:

>>> request.encoding
'utf-8'
>>> request.text
'some_glitchy_looking_binary_data'
>>> request.encoding = 'utf-16'
>>> request.text
'some_well_formed_data'

We should add this to Lims.get_file_contents. We should also be able to replace CRLFs with \n.