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
Variables named with modifiers (like \hat) are incorrectly saved #466
Comments
Hi @wsshin, I'm afraid, this isn't really a problem restricted to JLD2 but one more generally with Unicode.
|
Thanks @JonasIsensee. I reported the issue to JuliaLang/julia. |
The correct solution here is for JLD2 to apply normalization before doing the lookup. |
The place to edit is here, I think: Line 25 in 30dd578
The correct function to compare strings is |
I hit this with a variable named G\bar on Julia 1.9.0. I will rename variable to G for now. Thanks for documenting this issue. |
@JonasIsensee, is there any reason why your #466 (comment) cannot be implemented? I am experiencing this problem a year from my initial report, and I find that it hasn't been resolved yet. |
Oh, it should be relatively easy to fix. |
I can save variables named with modifiers (like
\hat
) with no problem:However, if I try to load the saved variable, an error is generated complaining that it cannot find the variable name:
Strangely, if I simply load the file without specifying the variable name, the result shows that the variable is actually loaded:
It turns out that the loaded
"â"
has a different byte representation than the saved"â"
:So, somewhere during
jldsave()
seems to change the byte representation of"â"
.Here is the version info:
The text was updated successfully, but these errors were encountered: