Tarskin / HappyTools

A tool for the (high-throughput) processing of HPLC data.
Apache License 2.0
35 stars 16 forks source link

TXT file encoding #51

Closed ShusakuASANO closed 4 years ago

ShusakuASANO commented 4 years ago

Hi,

I found that my workspace (Python3.7, anaconda distribution, windows10 64bit) have a problem in opening example chromatogram. The issue would be the default text encoding (CP932) in my windows workspace. Modifying the file_parser.py line 47 from with Path(master.filename).open() as fr: to __ with Path(master.filename).open(encoding="utf-8_sig") as fr: __ solved my problem.

If this modification makes no problem in other workspaces, could you consider setting this as default code? Thank you,

Tarskin commented 4 years ago

I will check the impact of that tonight on some of the European encodings and if there is no problem, then I will integrate the situation.

Tarskin commented 4 years ago

@ShusakuASANO Please review if the attached commit solves the bug on your system ;)

ShusakuASANO commented 4 years ago

@ShusakuASANO Please review if the attached commit solves the bug on your system ;)

Thank you, Tarskin! I confirmed that the new version works in my workspace:)