Closed BSchilperoort closed 1 year ago
Fixed in commit 3d54b5624d6974c95ddc6a791257276072e441f5 in the 0.1.x branch. This package now forces the use of English month and day of the week names, regardless of locale.
I will be pushing a 0.1.19 bugfix release to PyPI shortly.
Nice, thanks for fixing this!
When using
savemat
to write a .mat file, with a system locale such as Chinese, savemat writes a header containing Chinese characters. MATLAB is not able to read these files and fails the open the .mat file:Error using load - Unable to read MAT-file example.mat. Not a binary MAT-file. Try load -ASCII to read as text.
The offending code is here; https://github.com/frejanordsiek/hdf5storage/blob/ec2e1e34789ad27713b860eb4de5da99817fa315/hdf5storage/__init__.py#L1711
As
strftime
uses the locale to determine the month and day names, these can contain characters that MATLAB cannot read;Interestingly, Octave seems to be fine with the Chinese characters đ€·
Probably related to #116
Our discussion: https://github.com/EcoExtreML/STEMMUS_SCOPE_Processing/issues/38