Skip to content

Commit ad498b8

Browse files
committed
Set character set using method
1 parent 8248533 commit ad498b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/binsparse/hdf5_tools.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ template <typename H5GroupOrFile, std::ranges::contiguous_range R>
138138
requires(std::is_same_v<std::remove_cvref_t<R>, std::string>)
139139
void write_dataset(H5GroupOrFile& f, const std::string& label, R&& r) {
140140
H5::StrType string_type(H5::PredType::C_S1, r.size());
141-
H5Tset_cset(string_type, H5T_CSET_UTF8);
141+
string_type.setCset(H5T_CSET_UTF8);
142142
hsize_t size = r.size();
143143
H5::DataSpace dataspace(1, &size);
144144

@@ -168,7 +168,7 @@ inline std::string get_attribute(H5::H5Object& f, const std::string& key) {
168168
inline void set_attribute(H5::H5Object& f, const std::string& key,
169169
const std::string& value) {
170170
H5::StrType string_type(H5::PredType::C_S1, value.size());
171-
H5Tset_cset(string_type, H5T_CSET_UTF8);
171+
string_type.setCset(H5T_CSET_UTF8);
172172
hsize_t size = value.size();
173173
H5::DataSpace dataspace(1, &size);
174174

0 commit comments

Comments
 (0)