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 473040 - yelp does not display correctly translated man pages
yelp does not display correctly translated man pages
Status: RESOLVED FIXED
Product: yelp
Classification: Applications
Component: Man Pages
2.18.x
Other All
: Normal normal
: ---
Assigned To: Yelp maintainers
Yelp maintainers
: 482644 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-09-03 04:49 UTC by Andrew Zabolotny
Modified: 2010-12-20 18:48 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
A screenshot with yelp displaying text wrongly and man displaying it correctly (106.06 KB, image/png)
2007-09-03 04:50 UTC, Andrew Zabolotny
  Details
Patch for yelp-man-document.c (3.03 KB, patch)
2010-09-10 03:14 UTC, Takao Fujiwara
none Details | Review

Description Andrew Zabolotny 2007-09-03 04:49:34 UTC
Please describe the problem:
I use Fedora 7 with the man-pages-ru package installed, which provides some of the manuals in Russian. However, when I try to display such a manual, it's displayed in the wrong character set.

And another problem with this is that when multiple-language manual pages are available, there's no way to select a specific version. This is sometimes needed as the translated manuals can be missing descriptions for newer switches and features.

The later problem can be reproduced with the mplayer manual, which has its manual translated into several languages. If you enter "mplayer" into the search box, you should get two or four results (depending if you have installed mencoder or not), but clicking on the english manual gives you the translated version anyway, which is in the wrong encoding.


Steps to reproduce:
1. Install man-pages-ru from base repository and possibly mplayer from livna repository.
2. Select "Russian" in GDM login screen and login
3. Run Yelp
4. In the search box enter: "man ls"


Actual results:
You get the help page filled with garbage, as shown on the screenshot

Expected results:
I should see the russian text, like 'man' displays on the screenshot.


Does this happen every time?
yes

Other information:
Comment 1 Andrew Zabolotny 2007-09-03 04:50:37 UTC
Created attachment 94843 [details]
A screenshot with yelp displaying text wrongly and man displaying it correctly
Comment 2 Julian Sikorski 2007-09-18 14:55:32 UTC
This was already reported in redhat bugzilla [1], but nobody there seems to care. Maybe reporting the issue upstream will help. For reference, issue is present with Polish (pl_PL.utf-8) locale as well.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=219912
Comment 3 Matthew Barnes 2007-10-02 16:20:06 UTC
*** Bug 482644 has been marked as a duplicate of this bug. ***
Comment 4 Takao Fujiwara 2010-09-10 03:14:12 UTC
Created attachment 169920 [details] [review]
Patch for yelp-man-document.c

Currently yelp has the hardcoded language = "C" and encoding = "ISO-8859-1".

Almost man encoding would be UTF-8 so we don't have to use the legacy
encodings.
Comment 5 Takao Fujiwara 2010-11-17 08:16:40 UTC
Could you review the patch?
On the other hand, I think it might be good to remove langmap. The encoding can be detected from the locale dir.
Comment 6 Andrew Zabolotny 2010-11-17 11:45:36 UTC
Why not just take the output encoding from environment variable? I'm still not using utf-8 encoding for a number of reasons, so this patch won't work for me anyway.
Comment 7 Andrew Zabolotny 2010-11-17 11:46:22 UTC
I mean, from the standard "LANG" or "LC_MESSAGES" environment variables.
Comment 8 Takao Fujiwara 2010-11-18 02:34:06 UTC
(In reply to comment #6)
> Why not just take the output encoding from environment variable? 

It's also ok with me if the maintainer prefers to get encoding from env.

> I'm still not using utf-8 encoding for a number of reasons, so this patch won't work for me
> anyway.

However I don't understand why this patch doesn't work for you.
I checked man-pages-ru and I think the encoding is UTF-8.
It means does it work when you run yelp on either ru_UR.UTF-8 or ru_RU.koi8r since the man page files are encoded in UTF-8 ?
I think almost Linux man pages are shifted to UTF-8.

In some UNIX, the encodings are different by the location of man pages.
Comment 9 Andrew Zabolotny 2010-11-18 12:01:11 UTC
Sorry, you are right. I was assuming it is possible to find out somehow a man page's encoding, but now I looked into them and I see that there's no way. So, assuming UTF-8 codepage is the best way, besides newer 'man' just does the same.

I can't try your patch because it doesn't apply to yelp-2.30.2, this is the latest version for Fedora14.
Comment 10 Takao Fujiwara 2010-11-19 01:14:09 UTC
(In reply to comment #9)
> I can't try your patch because it doesn't apply to yelp-2.30.2, this is the
> latest version for Fedora14.

FYI:
http://fujiwara.fedorapeople.org/yelp/yelp-631657-man-utf8.patch.bak
Comment 11 Andrew Zabolotny 2010-11-19 13:02:13 UTC
Applied your patch on yelp 2.30.2 - works just fine.

Thank you!
Comment 12 Rupert Swarbrick 2010-12-20 16:54:05 UTC
I'm afraid the patch given will no longer apply to the git tree, since we've just completely rewritten the man page handling in master.

The good news is that we also fixed the bug :-)
Comment 13 Shaun McCance 2010-12-20 18:48:13 UTC
Seems to work for me as well. I'm resolving the bug. Please let me know if there are any further problems.