After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 752257 - g_print in C / POSIX locale mangles strings that can be better transliterated to ASCII
g_print in C / POSIX locale mangles strings that can be better transliterated...
Status: RESOLVED DUPLICATE of bug 502951
Product: glib
Classification: Platform
Component: i18n
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2015-07-11 02:04 UTC by Jon Bailey
Modified: 2018-02-01 22:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot illustrating problem. (68.45 KB, image/png)
2015-07-11 02:07 UTC, Jon Bailey
  Details
Proposed patch (1.17 KB, patch)
2015-07-11 02:21 UTC, Jon Bailey
none Details | Review

Description Jon Bailey 2015-07-11 02:04:18 UTC
Several GNOME and GLib-using programs have non-ASCII UTF-8 output (mostly ellipses and dashes, sometimes accented Latin letters.)  These are being substituted with '?' which looks wrong in --help output, e.g. "Déjà Dup" -> "D?j? Dup".

Affected programs: gtk-launch, brasero, evince, eog, deja-dup, etc.

Steps to reproduce:
Compare --help output between UTF-8 locale and C/POSIX locale.  Punctuation characters are replaced with '?'.

$ gtk-launch --help

$ LANG=C gtk-launch --help

Suggested fix:
g_print() strdup_convert() currently uses g_convert_with_fallback().
g_str_to_ascii() seems better ("…" -> "...", "Déjà" -> "Deja", etc.)
Comment 1 Jon Bailey 2015-07-11 02:07:52 UTC
Created attachment 307287 [details]
Screenshot illustrating problem.

Screenshot of the problem.  (I initially looked at iconv before finding g_str_to_ascii())
Comment 2 Jon Bailey 2015-07-11 02:21:38 UTC
Created attachment 307288 [details] [review]
Proposed patch
Comment 3 Jon Bailey 2015-07-20 17:22:21 UTC
Disregard above suggestion - that would break other non-Unicode locales (such as KOI8-R).

Trying to find an approach that catches non-translatable characters and transliterates something better than '?' (as above)
Comment 4 Philip Withnall 2018-02-01 22:19:43 UTC
Thanks for taking the time to report this.
This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 502951 ***