You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While writing the detail account in #7194, it has struck me that one usage that you can't get with the current proposal is to "automatically" encode data with utf-8 in the absence of an specific _Encoding attribute, and so to save without an _Encoding attribute.
So, I believe that is correct + ok according to the latest CF Conventions (>=v1.12).
But with the current proposal, Iris will insist on having an encoding attribute, and saving with one.
From the latest CF (post-v1.12), such data is certainly "ok"
.. and Iris will load it without question
.. but Iris refuses to save like this without also adding the _Encoding attribute
so, such data won't directly read-write roundtrip (will fail on re-save),
and requires the user to add an encoding attribute to make it save
Technically, with the code as it is, if we were simply to change iris.fileformats.netcdf.DEFAULT_WRITE_ENCODING to "utf-8", then I think all the above problems would be solved :
unicode data with no encoding attribute will automatically save as utf8, with no encoding attribute created
both ascii and utf8 data don't need an "_Encoding" attribute, for either read or write
but can have one if wanted.
changes to Chardata docs #7194 will be needed -- but I think it all gets simpler
While writing the detail account in #7194, it has struck me that one usage that you can't get with the current proposal is to "automatically" encode data with utf-8 in the absence of an specific
_Encodingattribute, and so to save without an _Encoding attribute.So, I believe that is correct + ok according to the latest CF Conventions (>=v1.12).
But with the current proposal, Iris will insist on having an encoding attribute, and saving with one.
_Encodingattributeand requires the user to add an encoding attribute to make it save
Technically, with the code as it is, if we were simply to change
iris.fileformats.netcdf.DEFAULT_WRITE_ENCODINGto "utf-8", then I think all the above problems would be solved :but can have one if wanted.