Opened 17 years ago

Closed 17 years ago

Last modified 15 years ago

#11387 closed defect (fixed)

BUG: man is not compatible with UTF-8

Reported by: vinc17@… Owned by: macports-tickets@…
Priority: Low Milestone:
Component: ports Version:
Keywords: Cc: vincent@…
Port:

Description

With UTF-8 locale, "man port" is displayed as:

<B7>H<B7> current: the port in the current working directory.

<B7>H<B7> active: set of installed and active ports.

<B7>H<B7> inactive: set of installed but inactive ports.

The fix seems to be to replace the -Tlatin1 option for NROFF by -Tascii in /opt/local/etc/man.conf (removing the -T option is not sufficient as the result is cached as /opt/local/man/cat1/port.1.bz2 but the file can't be read correctly in ISO-8859-1 locales due to the non-ASCII characters). Note that Linux uses another man software, which doesn't have such problems.

Change History (7)

comment:1 Changed 17 years ago by vinc17@…

Summary: man is not compatible with UTF-8BUG: man is not compatible with UTF-8

Also note that the man utility that comes with Mac OS X has no problem either.

comment:2 Changed 17 years ago by mww@…

Resolution: fixed
Status: newclosed

can't reproduce this with the (new and shiny) version 1.6e - if problem persists, please re-open with LC_CTYPE/LANG settings (or other environment) to reproduce this!

comment:3 Changed 17 years ago by vinc17@…

Resolution: fixed
Status: closedreopened

To reproduce this bug:

  1. Remove /opt/local/man/cat1/port.1.bz2 (this is the cached text file).
  1. In a terminal with the following locales:
    LANG="POSIX"
    LC_COLLATE="POSIX"
    LC_CTYPE="en_US.ISO8859-1"
    LC_MESSAGES="POSIX"
    LC_MONETARY="POSIX"
    LC_NUMERIC="POSIX"
    LC_TIME="POSIX"
    LC_ALL="POSIX/en_US.ISO8859-1/POSIX/POSIX/POSIX/POSIX"
    

type "man port" and quit. This creates the cache file.

  1. "bunzip2 -c /opt/local/man/cat1/port.1.bz2 | hexdump -C" should show you b7 characters.
  1. In a terminal with the following locales:
    LANG="POSIX"
    LC_COLLATE="POSIX"
    LC_CTYPE="en_US.UTF-8"
    LC_MESSAGES="POSIX"
    LC_MONETARY="POSIX"
    LC_NUMERIC="POSIX"
    LC_TIME="POSIX"
    LC_ALL="POSIX/en_US.UTF-8/POSIX/POSIX/POSIX/POSIX"
    

type "man port". With PAGER="less -is", I get <B7>H<B7> instead of bullets. FYI:

prunille:~> man -w port
/opt/local/man/cat1/port.1.bz2 (<-- /opt/local/man/man1/port.1)

Until "man" can know how to deal with this (e.g. by remembering the encoding and regenerating the text file if need be), one should stick to ASCII.

Anyway, this is not the only problem. Still in a terminal with UTF-8 locales:

prunille:~> cp /opt/local/man/man1/port.1 ~/man/man1/port-test.1
prunille:~> man -w port-test
/Users/vinc17/man/man1/port-test.1
prunille:~> man port-test

I also get <B7>H<B7> instead of bullets.

comment:4 Changed 17 years ago by pipping@…

Milestone: Available Ports

comment:5 Changed 17 years ago by pipping@…

Milestone: Available PortsPort Bugs

comment:6 Changed 17 years ago by pipping@…

Resolution: fixed
Status: reopenedclosed

fixed in r23599.

comment:7 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.