cheminfo / tga-spectrum

https://cheminfo.github.io/tga-spectrum/
MIT License
0 stars 2 forks source link

implement ta instrument parser #4

Closed kjappelbaum closed 4 years ago

kjappelbaum commented 4 years ago

this is the filetype requested here https://groups.google.com/forum/#!category-topic/cheminfo/4sKhtxwrB1Q 181217_Cryo1-1_N1-2@25C.txt

lpatiny commented 4 years ago

181217_Cryo1-1_N1-2@25C.txt

Can we have the brand / name of the instrument and the name of the software ?

Also the exportation procedure so that we can document this in the help of the TGA page.

There are already 2 text file parser so we need to be quite specific

image

kjappelbaum commented 4 years ago

this file is in a weird windows encoding "Little-endian UTF-16 Unicode text, with CRLF line terminators". For the tests I now used iconv but we should figure out if the files are always like this

lpatiny commented 4 years ago

You are speaking about the file that in the ticket ?

Because I did an hexdump and this is not UTF-16 seems to me

image

Or you have another example.

kjappelbaum commented 4 years ago

Yes, I'm speaking about this file which in my case also shows the ff fe BOM for UTF-16LE. This is why I posted here the note to double check if this is always saved like this. But I'll take care of figuring this out.

Screen Shot 2020-07-05 at 09 09 09
targos commented 4 years ago

You do not need iconv for this encoding. It's supported by Node.js: https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings