Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When there are Chinese characters in the file path, an exception is thrown #197

Open
Fokatu opened this issue Jun 19, 2022 · 13 comments
Open

Comments

@Fokatu
Copy link

Fokatu commented Jun 19, 2022

It seems to be an issue with the Hdf5 version, I'm also having that issue when using other libraries. Is it possible to upgrade the version of Hdf.pinvoke?

sample code:
var fid = Hdf5.CreateFile("f:/测试/test5.h5"); Hdf5.CloseFile(fid);

@LiorBanai
Copy link
Owner

Hi,
I'm able to create the file using the following code:

Directory.CreateDirectory("c:/测试");
var fileId = Hdf5.CreateFile("c:/测试/test5.h5");
Hdf5.CloseFile(fileId);

image

@LiorBanai
Copy link
Owner

I can add the CreateDirectory internally.

@Fokatu
Copy link
Author

Fokatu commented Jun 19, 2022

Thanks for your reply!
Very strange, the files I created are displayed as garbled characters in explorer.

`var fid = Hdf5.CreateFile("f:/test测试.h5");

        Hdf5.CloseFile(fid);`

image

My system: Windows 10 pro

@LiorBanai
Copy link
Owner

@Fokatu could it be fonts related issue on your system?
it looks ok here:
image

@Fokatu
Copy link
Author

Fokatu commented Jun 19, 2022

No, the system shows chinese correctly
image

@LiorBanai
Copy link
Owner

which .net version are you using?

@Fokatu
Copy link
Author

Fokatu commented Jun 19, 2022

.net 4.7.2

@Fokatu
Copy link
Author

Fokatu commented Jun 19, 2022

Chinese characters in group name are also garbled
image

@LiorBanai
Copy link
Owner

@Fokatu
Copy link
Author

Fokatu commented Jun 20, 2022

The problem is solved by checking the following option
image

@Fokatu Fokatu closed this as completed Jun 20, 2022
@LiorBanai
Copy link
Owner

glad you found the solution

@Fokatu Fokatu reopened this Oct 7, 2022
@Fokatu
Copy link
Author

Fokatu commented Oct 7, 2022

After further testing, I found that the latest version of HDF.PInvoke does not support Chinese, but the lower version does. Is it OK to downgrade the version of this library? HDF.PInvoke 1.10.5.2 works fine.
Also, how do I compile the .net framework version of the library? Thanks!

@LiorBanai
Copy link
Owner

hi @Fokatu ,
I more incline to have he issue itself fixed rather than downgrade the vresion.
if this an bug with the underlining library why not open an issue in their repository to let them be aware of it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants