MilesCranmer / PySR

High-Performance Symbolic Regression in Python and Julia
https://astroautomata.com/PySR
Apache License 2.0
2.32k stars 211 forks source link

Ensure files are read as utf-8 on all operating systems #396

Closed MilesCranmer closed 1 year ago

MilesCranmer commented 1 year ago

Fixes #395.

The default Julia encoding is UTF-8, so the writing seems fine.

However, apparently Python has different encodings for reading on different architectures, which is why it can break sometimes. The fix is to always assume UTF-8 in reading the equation file.