3

I am trying to get a proper display of national characters with FreeBSD man. I have tried running the following on 8.1 and 9.0:

# PAGER=less LANG="pl_PL.UTF-8" man -d -M. ./man.1 -- Using architecture: i386:i386 -- Using pager: less -- Using manual sections: 1:1aout:8:2:3:n:4:5:6:7:9:l -- Using locale paths: pl_PL.UTF-8:pl.UTF-8:en.UTF-8:. -- Using standard page width -- Searching for ./man.1 -- Found a usable page, displaying that -- Command: /usr/bin/zcat -f ./man.1 | tbl | groff -S -P-h -Wall -mtty-char -man -Tascii -P-c | less 

But it prints:

Program man jest systemowA przeglAdarkA stron podrAcznika ekranowego.KaA1/4dy argument...

The same manpage displays properly on a Linux host:

Program man jest systemową przeglądarką stron podręcznika ekranowego. Każdy argument...

I have been told by a knowledgeable person that manpages on 9.0 are supposed to display properly. What am I missing?

2 Answers 2

1

I think you are missing having LESSCHARSET=utf-8 in your environment. At least on my FreeBSD host using this setting allows me to view the manual pages in the right way.

0

The -Tascii argument to groff looks suspicious.

On further investigation, it seems man sets this parameter based on where in the MANPATH it found the man page.

For example, on my system, -Tutf8 is used whenever the debug output shows

Found manpage /usr/share/man/en.UTF-8/man1/... 

but -Tascii is used when it shows

Found manpage /usr/share/man/man1/... 

In this case, I think the problem is that man doesn't see any locale name in the path to the man page, so it defaults to ASCII/C locale.

As a workaround, try this:

mkdir -p pl.UTF-8/man1 cp man.1 pl.UTF-8/man man -d -M. man 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.