dfc doesn't displays unicode names properly
It looks like dfc has issues determining unicode strings' length. As /dev/sdXY name are ascii only, this is only visible, for example, when folders are mounted with the "bind" option that include non ascii characters in their name. Although the name is displayed properly, each non ascii character (e.g. "é") is counted as more than one character. This causes the "(=) USED FREE (-)" bar not to be aligned anymore for the lines with these characters.
Updated by Robin Hahling almost 5 years ago
Short story: C and unicode is a nightmare
I've attempted things to fix this issue (see attached patch for the record). So computing the width required to display a unicode string is not an issue but then other issues arise. For instance, things like this do not work with unicode strings:
(void)printf("%-*s", max.fsname, fsname);
This means that then one should probably be using wprintf(3) but then it means that all
char * need to be converted to
wchart_t * and so on. You see the picture. Without using something like the ICU library, it is a nightmare and I am not willing to make ICU a dependency of dfc.