Bug 112518

Summary: If an application whose name includes non ascii characters is executed on ja_JP.UTF-8 locale, ps(1) cannot output the application name correctly.
Product: Red Hat Enterprise Linux 3 Reporter: L3support <linux-sid>
Component: procpsAssignee: Karel Zak <kzak>
Status: CLOSED WONTFIX QA Contact: Brian Brock <bbrock>
Severity: high Docs Contact:
Priority: medium    
Version: 3.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-11-18 08:31:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description L3support 2003-12-22 02:34:00 UTC
Description of problem:
If an application whose name or path includes multibyte characters is
executed on ja_JP.UTF-8 locale, ps(1) cannot output the application name 
correctly.


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


How reproducible:
ã»always


Steps to Reproduce:
1. $ echo $LANG
2. $ ./ãã¹ã
3. $ ps -al

  
Actual results:
  $ echo $LANG
  ja_JP.UTF-8
  $ ./ãã¹ã &
  [1] 18904
  $ ps -af
  UID        PID  PPID  C STIME TTY          TIME CMD
     .
     .
  root     18795     1  0 12:38 tty1     00:00:00 /usr/libexec/gconfd-2 5
  root     18904 18876  0 15:59 pts/5    00:00:00 ./?????
  root     19148  2893  0 15:59 pts/0    00:00:00 ps -af
  $


Expected results:
ps(1) output application name correctly

  $ ./ãã¹ã &
  [1] 18904
  $ ps -af
  UID        PID  PPID  C STIME TTY          TIME CMD
     .
     .
  root     18795     1  0 12:38 tty1     00:00:00 /usr/libexec/gconfd-2 5
  root     18904 18876  0 15:59 pts/5    00:00:00 ./ãã¹ã
  root     19148  2893  0 15:59 pts/0    00:00:00 ps -af
  $


Additional info:

Comment 1 Alexander Larsson 2004-02-05 10:28:58 UTC
Mass reassign to new owner

Comment 2 Daniel Walsh 2004-02-11 14:10:32 UTC
Could you try this with procps 3.1.15

Comment 3 Daniel Walsh 2004-03-29 12:54:53 UTC
Comments from Upstream Maintainer.

Fixing this is somewhat dangerous. Process names are
untrusted data. If they contain escape codes, they could
reprogram the terminal's keys!

The byte (0x80|'\e') must NEVER be printed. If the terminal
is not really in UTF-8 mode, all sorts of mayhem can occur.

Beyond that... sure, something could be done. Troublesome
characters should be filtered out. These include:

* major UTF-8 encoding violations (0x88 0x88 0x88 0x88)
* minor UTF-8 encoding violations (non-canonical form)
* anything else likely to confuse a terminal



Comment 4 Karel Zak 2004-11-18 08:31:24 UTC
The problem with UTF-8 cannot be fixed in RHEL3 / RHEL4. It require
rewrite a lot of code in "ps". This is done in version 3.2.4 that is
avaiable for FC4 and probably will in new RHEL (>4) versions.