GFile utf8 xattr attributes behaviour
According to g_file_info_set_attribute_string()
, @attr_value
is a utf8 string.
But this isn't being tested in tests/g-file-info.c
. Instead, escaped strings are tested...
For some reason, in set_xattr() (https://gitlab.gnome.org/GNOME/glib/-/blob/main/gio/glocalfileinfo.c#L798), the value is unescaped. That's somewhat unexpected, and should be documented (which escape format?).
On get_one_xattr() path (https://gitlab.gnome.org/GNOME/glib/-/blob/main/gio/glocalfileinfo.c#L416), the value is escaped back, which results in different values from what was set with valid utf8 strings.
Edited by Philip Withnall