tbeu / matio

MATLAB MAT File I/O Library
https://matio.sourceforge.io
BSD 2-Clause "Simplified" License
338 stars 97 forks source link

Mat_CreateVer and Mat_Open do not support unicode (wstring) filename on windows #105

Closed Nelson-numerical-software closed 5 years ago

Nelson-numerical-software commented 5 years ago

Mat_CreateVer and Mat_Open do not support wchar_t* as filename

A = 1:10
save('d:/漢字.mat')
clear
load('d:/漢字.mat')
tbeu commented 5 years ago

Confirmed. Unfortunately, there neither is a wide-tring equivalent of H5Fcreate nor H5Fopen. Please see also here or contact the HDF Group with your requirement. Once the hdf5 C library supports wide-string file names, I can extend matio to also support it consistenly.

Nelson-numerical-software commented 5 years ago

not only hdf5, same problem with v6, or others

tbeu commented 5 years ago

I know. That's why I wrote consistenly = for all versions.

Nelson-numerical-software commented 5 years ago

reported on HDF5 forum: https://forum.hdfgroup.org/t/h5fcreate-and-h5fopen-with-chinese-filename-wide-char/1450/5 and here: https://forum.hdfgroup.org/t/wide-string-equivalent-of-h5fcreate-or-h5fopen/5482/2

tbeu commented 5 years ago

Should be possible by 6d47ebd4bb1186a737f895848009de1e317f9962. For v7.3 MAT files you'll need the next major HDF5 version (probably 1.12.x due in September).

By the way, it already was working correctly in Cygwin, but I guess you meant MSVC when you said windows.

Nelson-numerical-software commented 4 years ago

Sorry to ask here but it is not clear in release notes of hdf5 library, does it already released in an official hdf5 library released or not ? last official hdf5 library 1.10.6 https://hdf-wordpress-1.s3.amazonaws.com/wp-content/uploads/manual/HDF5/HDF5_1_10_6/source/hdf5-1.10.6-RELEASE.txt?utm_source=HDF+Group+Contacts&utm_campaign=248761b238-HDF5+1.10.6+Release+%28Newsletter+%23170%29&utm_medium=email&utm_term=0_60afc5d864-248761b238-212404827

Nelson-numerical-software commented 4 years ago

Sorry to ask here but it is not clear in release notes of hdf5 library, does it already released in an official hdf5 library released or not ? last official hdf5 library 1.10.6 https://hdf-wordpress-1.s3.amazonaws.com/wp-content/uploads/manual/HDF5/HDF5_1_10_6/source/hdf5-1.10.6-RELEASE.txt?utm_source=HDF+Group+Contacts&utm_campaign=248761b238-HDF5+1.10.6+Release+%28Newsletter+%23170%29&utm_medium=email&utm_term=0_60afc5d864-248761b238-212404827

It will be available in 1.12 current branch is only alpha stage ... https://bitbucket.hdfgroup.org/projects/HDFFV/repos/hdf5/browse/release_docs/HISTORY-1_10_0-1_12_0.txt?at=refs%2Fheads%2Fhdf5_1_12

tbeu commented 4 years ago

Yes, there is not yet a released hdf5 library version.

Nelson-numerical-software commented 4 years ago

hdf5 1.12 is available. A matio release with official support could be great. It seems that vs project (matio) need to be updated (zlib.h not found) for hdf5 1.12 but zlib.h is available in CMake-hdf5-1.12.0-x64\build\ZLIB-prefix\src\ZLIB