Closed ul closed 7 years ago
This code works, but probably it's not the best solution:
for (j = 0; j < Wosize_val(caml_values); j++) {
std::string s = String_val(Field(caml_values,j));
String *value = new String(s, String::UTF8);
values->append(*value);
}
instead of https://github.com/savonet/ocaml-taglib/blob/master/src/taglib_stubs.cc#L404
Actually it is the right solution. The binding was written with the assumption that all string are UTF8, as documented in the .mli
interface. Thanks!
It seems like using
set_properties
doesn't set encoding byte. Strings are written in UTF-8, but then read as if they were Latin-1.