Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PBM: special characters in UTF8 man pages [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Wed Sep 11, 2013 6:42 pm    Post subject: PBM: special characters in UTF8 man pages [SOLVED] Reply with quote

Hi.

I've been having this issue for as long as I've been using Gentoo. My locale is fr_BE.UTF-8 and some man pages written in French are wrongly displayed. It's especially true with UTF-8 man pages, like this one:
bzcat /usr/share/man/fr/man1/mplayer.1.bz2:
.\" synced with r30135
.\" MPlayer (C) 2000-2010 MPlayer Team
.\" The English man page was/is done by Gabucino, Diego Biurrun, Jonas Jermann
.\" Traduction: Guillaume POIRIER < poirierg AT gmail POINT com >,
.
.\" --------------------------------------------------------------------------
.\" Définition des macros
.\" --------------------------------------------------------------------------
.
.\" Définit l'indentation pour les sous-options
.nr SS 4
.\"
.de IPs
.IP "\\$1" \n(SS
..
.\" début du premier niveau des sous-options, se termine par .RE
.de RSs
.RS 10
..
.\" début du 2nd niveau des sous-options
.de RSss
.PD 0
.RS \n(SS+3
..
.\" fin du 2nd niveau des sous-options
.de REss
.RE
.PD 1
..
.
.\" --------------------------------------------------------------------------
.\" Titre
.\" --------------------------------------------------------------------------
.
.TH MPlayer 1 "27 avril 2009" "The MPlayer Project" "Le Lecteur Vidéo"
.
.SH NAME
mplayer  \- Lecteur vidéo
.br
mencoder \- Encodeur vidéo
.
.\" --------------------------------------------------------------------------
.\" Synopsis
.\" --------------------------------------------------------------------------
.
.SH SYNOPSIS
.na
.nh
.B mplayer
[options] [fichier|URL|liste de lecture |\-]
.
.br
.B mplayer
[options] fichier1
[options spécifiques] [fichier2] [options spécifiques]
.
.br
.B mplayer
[options]
{ "groupe de fichiers et d'options" }
[options spécifiques au groupe]
.
.br
.B mplayer
[dvd|dvdnav]://[titre|[titre_de_début]\-titre_de_fin ][/périphérique]
[options]
.
.br
.B mplayer
vcd://piste[/périphérique]
[options]
.
.br
.B mplayer
tv://[chaîne][/identifiant de l'entrée]
[options]
.
.br
.B mplayer
radio://[chaîne|fréquence][/capture]
[options]
.
.br
.B mplayer
pvr://
[options]
.
.br
.B mplayer
dvb://[numero_de_carte@]canal
[options]
.
.br
.B mplayer
mf://[masque de fichier|@liste de fichiers]
[options \-mf] [options]
.
.br
.B mplayer
[cdda|cddb]://piste[\-piste_de_fin][:vitesse][/périphérique]
[options]
.
.br
.B mplayer
cue://fichier[:piste]
[options]
.
.br
.B mplayer
[file|mms[t]|http|http_proxy|rt[s]p|ftp|udp|unsv|icyx|noicyx|smb]://
[utilisateur:mot_de_passe@]URL[:port] [options]
...

shows like
man mplayer:
NAME
       mplayer  - Lecteur vidéo
       mencoder - Encodeur vidéo

SYNOPSIS
       mplayer [options] [fichier|URL|liste de lecture |-]
       mplayer [options] fichier1 [options spécifiques] [fichier2] [options
       spécifiques]
       mplayer [options] { "groupe de fichiers et d'options" } [options
       spécifiques au groupe]
       mplayer [dvd|dvdnav]://[titre|[titre_de_début]-titre_de_fin
       ][/périphérique] [options]
       mplayer vcd://piste[/périphérique] [options]
       mplayer tv://[chaîne][/identifiant de l'entrée] [options]
       mplayer radio://[chaîne|fréquence][/capture] [options]
       mplayer pvr:// [options]
       mplayer dvb://[numero_de_carte@]canal [options]
       mplayer mf://[masque de fichier|@liste de fichiers] [options -mf]
       [options]
       mplayer [cdda|cddb]://piste[-piste_de_fin][:vitesse][/périphérique]
       [options]
       mplayer cue://fichier[:piste] [options]
...

The source file is indeed UTF8 but somewhere something between grotty, gtbl, nroff, groff, troff, poff, moff, boff, zoff, floff and wtfoff that shows it as if it were ASCII instead. I've checked Gentoo wiki about man and UTF8 but man.conf already has the described shape.

Can anyone help?

Thanks in advance for any hint/suggestion.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!


Last edited by VinzC on Fri Jan 03, 2014 11:00 am; edited 3 times in total
Back to top
View user's profile Send private message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1877
Location: Switzerland (Romandie)

PostPosted: Mon Nov 18, 2013 9:05 am    Post subject: Reply with quote

Hi,

After trying everything, inclusive from that thread, buzz22 solution is working for me: groff-utf8.
_________________
"Confirm You are a robot." - the singularity
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Thu Nov 21, 2013 7:43 am    Post subject: Reply with quote

Thanks a lot Dominique_71!

I'll try this and report. (I expect it to work as it did for you.) I'm just surprised groff (since it's the one pointed at) still doesn't process UTF8 properly after all those years.

http://www.haible.de/bruno/packages-groff-utf8.html wrote:
Of course this is only a stopgap measure, until groff can process UTF-8 encoded man pages by itself, sometime in the future.
[...]
Last modified: 5 July 2005.

File a bug?

EDIT: Works like a charm! 8) Thanks a bunch again!
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Fri Jan 03, 2014 10:35 am    Post subject: Reply with quote

Unfortunately, it was too good to be true :( . Thought it was solved for good but I just ran into the same issue *sighs* AGAIN *sighs*

I checked the tarball and it installs groff-utf8 in /usr/local/bin, which is fine for me. I then edited /etc/man.conf as follows:
/etc/man.conf:
TROFF           /usr/local/bin/groff-utf8 -Tps -mandoc
NROFF           /usr/bin/nroff -mandoc
JNROFF          /usr/local/bin/groff-utf8 -Tnippon -mandocj

I then ran emerge mplayer again and man pages STILL contain that UTF/ASCII garbage :evil: . Now I'm definitely at my wit's ends. Need help.

EDIT: My bad, forgot to change the NROFF line too:
/etc/man.conf:
TROFF           /usr/local/bin/groff-utf8 -Tps -mandoc
NROFF           /usr/local/bin/groff-utf8 -Tutf8 -mandoc
JNROFF          /usr/local/bin/groff-utf8 -Tnippon -mandocj

Now it works again.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
r90
n00b
n00b


Joined: 08 Feb 2008
Posts: 19

PostPosted: Tue Nov 25, 2014 7:18 am    Post subject: Reply with quote

A little late, but the answer is:
Code:
NROFF      /usr/bin/groff -mandoc -Tutf8 -k

Note of using groff, not the nroff stupid script. Seems that without -k groff making something horrible with charset. I don't know what, but I can guess, that groff silently assume that input is latin1.
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Fri Nov 28, 2014 11:48 am    Post subject: Reply with quote

Ah... that explains why it didn't work in the first place. I tried groff-utf8 in despair so, thanks a lot for sharing 8) .
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum