where the loop stops prematurely because of the j < (stsize-1) condition. The fix is probably quite simple; just make this j < stsize instead, which would cause the entire string to be written.
Incidentally, datasets do the right thing, so I don't see why attributes have this weird behavior.
One would expect my name to fit inside the attribute, but alas:
This seems to be caused by
https://github.com/grimbough/rhdf5/blob/cb102ba93d22a703de118e4e8e65ae73c4aaff0c/src/H5A.c#L457
where the loop stops prematurely because of the
j < (stsize-1)
condition. The fix is probably quite simple; just make thisj < stsize
instead, which would cause the entire string to be written.Incidentally, datasets do the right thing, so I don't see why attributes have this weird behavior.
Session information
``` R Under development (unstable) (2023-11-10 r85507) Platform: x86_64-pc-linux-gnu Running under: Ubuntu 20.04.6 LTS Matrix products: default BLAS: /home/luna/Software/R/trunk/lib/libRblas.so LAPACK: /home/luna/Software/R/trunk/lib/libRlapack.so; LAPACK version 3.11.0 locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C time zone: America/Los_Angeles tzcode source: system (glibc) attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] rhdf5_2.47.0 loaded via a namespace (and not attached): [1] compiler_4.4.0 rhdf5filters_1.15.1 Rhdf5lib_1.25.0 ```