Extended Attributes possible bug

How does Dolphin handle extended attributes?

Adding a tag or a comment to a file in ASCII is displayed with no problems using getfattr -d. However, if non-ASCII letters are inserted, getfattr suddenly prints out encoded(?) strings?

$ getfattr -d file

I just want to make sure how this works and confirm it’s a bug before submitting it.

1 Like

This is a problem with the output of getfattr, not with Dolphin. If you type non-ASCII text into an extended attribute, getfattr won’t know how to handle that (or more correctly - it didn’t read the FreeDesktop.org spec that said xdg extended attributes must be UTF-8 and it doesn’t think your terminal can handle the binary data), so getfattr “helpfully” ASCII-armors the “binary” data for you.

See the man page:

-e en, --encoding=en
Encode values after retrieving them. Valid values of en are
“text”, “hex”, and “base64”. Values encoded as text strings
are enclosed in double quotes ("), while strings encoded as
hexadecimal and base64 are prefixed with 0x and 0s,

You can workaround this problem by using getfattr -e text -d file.