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 760432 - [PATCH] libgtop_daemon2 --help shows translated characters as question marks on some locales
[PATCH] libgtop_daemon2 --help shows translated characters as question marks ...
Status: RESOLVED FIXED
Product: libgtop
Classification: Core
Component: general
2.33.x
Other FreeBSD
: Normal normal
: ---
Assigned To: libgtop maintainers
libgtop maintainers
Depends on:
Blocks:
 
 
Reported: 2016-01-11 06:31 UTC by Ting-Wei Lan
Modified: 2016-01-11 16:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Call setlocale in main function of libgtop_daemon2 (925 bytes, patch)
2016-01-11 06:33 UTC, Ting-Wei Lan
committed Details | Review

Description Ting-Wei Lan 2016-01-11 06:31:41 UTC
Please see the attached patch. libgtop_daemon2 should call setlocale in main function in order to correctly show translated messages.

Running 'libgtop_daemon2 --help' with zh_TW.UTF-8 locale shows:
???
  libgtop_daemon2 [???]

?????
  -h, --help          ???????

???????
  -d, --debug         Enable debugging
  -v, --verbose       Enable verbose output
  -f, --no-daemon     Don't fork into background
  -i, --inetd         Invoked from inetd
Comment 1 Ting-Wei Lan 2016-01-11 06:33:10 UTC
Created attachment 318700 [details] [review]
Call setlocale in main function of libgtop_daemon2

It is required to correctly show translated messages on some locales.
Comment 2 Benoît Dejean 2016-01-11 15:31:09 UTC
OK, but out of your curiosity, why were you launching this by hand ?
Comment 3 Benoît Dejean 2016-01-11 15:32:33 UTC
Review of attachment 318700 [details] [review]:

OK
Comment 4 Ting-Wei Lan 2016-01-11 16:08:19 UTC
I have seen this kind of broken output messages in many different programs, so I decided to debug it yesterday. I checked all programs in my $JHBUILD_PREFIX/bin and fixed all of them. More than 20 bug reports were filed for this kind of problem, and this is one of them.

I know it is unusual to run libgtop_daemon2 by hand, but I did this simply because it is installed in $bindir.
Comment 5 Ting-Wei Lan 2016-01-11 16:09:05 UTC
Attachment 318700 [details] pushed as 05cb14d - Call setlocale in main function of libgtop_daemon2