Comments (5)
Hi @wsshin,
I'm afraid, this isn't really a problem restricted to JLD2 but one more generally with Unicode.
There appear to be two different unicode representations of the "same" visual symbol
and julia generates a different version depending on how you create it.
julia> :â
:â
julia> string(:â)
"â"
julia> string(:â) == "â"
false
julia> codeunits(string(:â))
2-element Base.CodeUnits{UInt8, String}:
0xc3
0xa2
julia> codeunits("â")
3-element Base.CodeUnits{UInt8, String}:
0x61
0xcc
0x82
julia> Symbol(string(:â)) == :â
true
julia> string(Symbol("â")) == "â"
true
julia> Symbol("â") == :â
false
julia> string(:â) == "â"
false
from jld2.jl.
The place to edit is here, I think:
Line 25 in 30dd578
The correct function to compare strings is Unicode.is_equal_normalized()
and one could consider always adding a normalization step prior to saving (or loading the whole thing) with Unicode.normalize()
from jld2.jl.
Thanks @JonasIsensee. I reported the issue to JuliaLang/julia.
from jld2.jl.
The correct solution here is for JLD2 to apply normalization before doing the lookup.
from jld2.jl.
Related Issues (20)
- Custom serialization with duplicated instances HOT 8
- circular references with Ref are not correctly restored using custom serialization HOT 1
- 0.4.26 broken - UndefVarError in `JLD2.ReadRepresentation()` HOT 9
- Custom serialization with duplicated instances with Vector HOT 7
- issue under Julia v1.8.3 HOT 6
- Error saving DataFrame in 1.8.3 HOT 3
- custom serialization through NamedTuples HOT 2
- Remove large_fractal_heap.h5 (60Mb) file from package? HOT 3
- No compression with `jldsave` HOT 2
- `JLD2.InvalidDataException("Did not find a Superblock.")` error from "straightforward" save and load HOT 1
- error reconstructing DataFrames? (with solution) HOT 2
- overwriting existing data HOT 3
- InexactError while loading JLD2 HOT 3
- Reading data file fails when original package that created the data changed HOT 5
- Unpack for JLD2File HOT 1
- Reconstruction warnings HOT 2
- save_object has no compress kwarg HOT 1
- CuArray support
- TimeDatatype not defined HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jld2.jl.