Open jelzo opened 1 year ago
I'm not an expert on text encodings, but it seems like maybe ASCII is a strict subset of UTF-8 (at least in this context), so that we could always use a UTF-8 decoder on strings in the jsfive code, since ASCII and UTF-8 are the only encodings supported internally for names in HDF5. It would actually simplify the code a bit: where there's a switch to choose encoders based on a flag in the metadata, we could just ignore that flag and always use TextDecoder('utf-8')
The following snippet:
Returns:
Environment: Node.js 18.9.1
Cause: Many production Node.js hosting environments are built with small-icu and not the full icu data, so the module can't use encodings other than utf-8, utf-16, utf-16be in TextDecoder(encoding).