Commit 10c490cd introduced the UTF-8 ellipsis character for some reason. It does not get converted correctly to the C locale; it falls back to a question mark instead.
Call setlocale (LC_ALL, ""); near the start of main() to make sure your process is running in the user’s locale (as specified in their environment). Otherwise it will be running in the C locale, which only supports ASCII.
Thanks! That’s a fine workaround. Ideally it would work in a reasonable way even with ASCII, but that can stay on the wishlist.
I thought our project’s code was already calling setlocale (LC_ALL, ""). But it turns out it does that immediately AFTER g_option_context_parse_strv(). So the help output uses the C locale. We can fix that on our end.
Right, I’m not disagreeing with you. Your statement is objectively correct.
By “workaround,” I mean that IMO it’s desirable for messages to display correctly in an ASCII code set, when there is an reasonable way to do so. For example:
There may be no reasonable drop-in replacement for Chinese or Cyrillic characters. If for some reason those appeared in the output, we’d probably have to fall back to '?’.
Curly quote characters could be replaced by straight ASCII quotes.
An ellipsis could be replaced by three dots.
*nix man pages and help outputs have used straight quotes and three-dot ellipses for years and it’s been fine. Implementation effort and time availability notwithstanding, IMO it would be nice for GLib to fall back to those representations if the code set is ASCII-only.
Anyway, setting the locale correctly should take care of this in the majority of environments. So thank you for pointing that out. I’ll address that on our end.
I’m not sure it is worth the effort to do character replacements like that. We’ve had Unicode for over 30 years now, and localised/internationalised interfaces are a pretty fundamental requirement of any publicly available software. Supporting ASCII-only environments is not something I see it worth putting resources into, given that upstream development resources are extremely limited.