Pádraig Brady wrote: > I've also attached an alternative patch for df (in your name). That still has problems, since it can generate improperly-encoded strings in UTF-8 locales (if the inputs are improperly encoded), and can replace parts of multibyte characters with '?' in non-UTF-8 locales. Please try the attached patch instead, which attempts to address these issues. This is more along the lines that Bruno suggested, except it doesn't use mbsiter as I figured it was simpler overall just to use mbrtowc directly for this one thing.