I tried to run the LSL-PyOptimizer with the AVSitter/AVSitter repository makefile (e.g. https://github.com/AVsitter/AVsitter/blob/master/AVsitter2/Makefile )
This fails with a Python 3.13 install on Windows, due to the default I/O-encoding for newly opened files being CP1252 (german windows) instead of CP65001.
So processing the UTF-8 encoded files, it blows up reading the input and writing the output files, as open() defaults to the system encoding instead of UTF-8. I would assume stdio has similar issues (unless setup with PYTHONIOENCODING).
I hacked together a solution for me, simply using binary read and explicit encoding on output. Thats obviously not the proper way to do it for a mixed mode py2/py3 script, but may be helpful for others stumbling on this issue.
winfix.patch
I tried to run the LSL-PyOptimizer with the AVSitter/AVSitter repository makefile (e.g. https://github.com/AVsitter/AVsitter/blob/master/AVsitter2/Makefile )
This fails with a Python 3.13 install on Windows, due to the default I/O-encoding for newly opened files being CP1252 (german windows) instead of CP65001.
So processing the UTF-8 encoded files, it blows up reading the input and writing the output files, as open() defaults to the system encoding instead of UTF-8. I would assume stdio has similar issues (unless setup with PYTHONIOENCODING).
I hacked together a solution for me, simply using binary read and explicit encoding on output. Thats obviously not the proper way to do it for a mixed mode py2/py3 script, but may be helpful for others stumbling on this issue.
winfix.patch