Bug 211562 - weird characters in pstree out w/ UTF8 charset
weird characters in pstree out w/ UTF8 charset
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: psmisc (Show other bugs)
5.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Karel Zak
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-19 21:13 EDT by William Yardley
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-03-14 16:57:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description William Yardley 2006-10-19 21:13:20 EDT
Description of problem:

I'm not sure if this is a real problem, but I think it is. With the default
locale settings of RHEL 5:
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

I get weird output from pstree:

[william@george-web1 ~]$ pstree
init─┬─crond
     ├─events/0
     ├─events/1
     ├─events/2
     ├─events/3
     ├─httpd─┬─8*[httpd]
     │       └─3*[rotatelogs]
     ├─irqbalance
     ├─khelper
     ├─klogd
     ├─ksoftirqd/0
     ├─ksoftirqd/1
     ├─ksoftirqd/2
     ├─ksoftirqd/3
     ├─kthread─┬─aio/0
     │         ├─aio/1
     │         ├─aio/2
     │         ├─aio/3

A co-worker gets this via SSH with SecureCRT (with $TERM set to "linux"), and I
get it on Eterm with $TERM set to xterm, xterm-xfree86, or Eterm. Setting $LANG,
$LC_CTYPE or $LC_ALL to "C" or ISO-8859-1 "fixes" the problem. I don't think
pstree is attempting to use ACS characters, and these should work fine in my
terminal anyway.

Interestingly, if I do:
pstree | cat
or
pstree > file
less file

it looks fine.

Version-Release number of selected component (if applicable):

22.2-5

Steps to Reproduce:
1. type pstree at the prompt with LANG set to en_US.UTF-8 from a non-UTF-8
capable terminal.
Comment 1 Adam Tkac 2006-10-20 07:38:12 EDT
reasinging to proper package
Comment 2 William Yardley 2006-10-20 11:52:46 EDT
D'oh - sorry - meant to put this in psmisc.
Comment 3 Karel Zak 2007-03-14 16:57:14 EDT
Why do you have UTF-8 setting for non-UTF-8 terminal? It seems like odd environment.
Comment 4 William Yardley 2007-03-14 17:38:54 EDT
(In reply to comment #3)
> Why do you have UTF-8 setting for non-UTF-8 terminal? It seems like odd
> environment.

IIRC, RHEL ships with UTF-8 as the default setting for LANG / LC_ALL. So if
you're going to argue that it's a bad setting, don't set it by default.
Comment 5 Karel Zak 2007-03-14 18:49:18 EDT
Well, the setting works well for almost all users. If you need something
different you can define your own environment to $HOME/.i18n (see also system
defaults in /etc/sysconfig/i18n). For more details see /etc/profile.d/lang.s
where is bash profile script that initialize the setting.

Note You need to log in before you can comment on or make changes to this bug.