watch command does not show utf-8 characters

Bug #318221 reported by Savvas Radevic on 2009-01-17
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Procps
Invalid
Undecided
Unassigned
procps (Debian)
Fix Released
Unknown
procps (Ubuntu)
Low
Unassigned

Bug Description

Binary package hint: procps

Ubuntu 8.10 Intrepid Ibex
Using UTF-8 characters, in gnome-terminal I can output it correctly with echo, but watch does not support utf-8.

$ echo "τεστ - тест - copyright (c) or ©"
τεστ - тест - copyright (c) or ©

$ echo "τεστ - тест - copyright (c) or ©" > testmycase
$ watch -n 2 cat testmycase

Every 2.0s: cat moofaro Sat Jan 17 18:10:41 2009

 - - copyright (c) or

$ apt-cache policy gnome-terminal procps
gnome-terminal:
  Installed: 2.24.1.1-0ubuntu1
  Candidate: 2.24.1.1-0ubuntu1
  Version table:
 *** 2.24.1.1-0ubuntu1 0
        500 http://de.archive.ubuntu.com intrepid-updates/main Packages
        100 /var/lib/dpkg/status
     2.24.1-0ubuntu1 0
        500 http://de.archive.ubuntu.com intrepid/main Packages
procps:
  Installed: 1:3.2.7-9ubuntu2.1
  Candidate: 1:3.2.7-9ubuntu2.1
  Version table:
 *** 1:3.2.7-9ubuntu2.1 0
        500 http://security.ubuntu.com intrepid-security/main Packages
        500 http://de.archive.ubuntu.com intrepid-updates/main Packages
        100 /var/lib/dpkg/status
     1:3.2.7-9ubuntu2 0
        500 http://de.archive.ubuntu.com intrepid/main Packages

Also reported here:
http://www.gp-net.nl/2008/05/22/watch-command-does-not-support-utf-8-characters/

tags 279407 wontfix
severity 279407 wishlist
tags 217841 upstream
forwarded 217841 <email address hidden>
forwarded 222817 <email address hidden>
tags 226385 wontfix
severity 226385 wishlist
tags 236181 wontfix
severity 236181 wishlist
tags 240989 upstream
forwarded 240989 <email address hidden>
tags 290757 help
severity 290757 wishlist
tags 309352 wontfix
severity 309352 wishlist

--
Craig Small GnuPG:1C1B D893 1418 2AF4 45EE 95CB C76C E5AC 12CA DFA5
Eye-Net Consulting http://www.enc.com.au/ MIEE Debian developer
csmall at : enc.com.au ieee.org debian.org

Package: procps
Version: 1:3.2.7-8

debian testing/lenny

watch is not able to show german umlauts ä,ö,ü and degree-sign "°", too.

Thanks
christian

_____________________________________________________________________
Unbegrenzter Speicherplatz für Ihr E-Mail Postfach? Jetzt aktivieren!
http://freemail.web.de/club/landingpage.htm/?mc=025555

Savvas Radevic (medigeek) wrote :

Binary package hint: procps

Ubuntu 8.10 Intrepid Ibex
Using UTF-8 characters, in gnome-terminal I can output it correctly with echo, but watch does not support utf-8.

$ echo "τεστ - тест - copyright (c) or ©"
τεστ - тест - copyright (c) or ©

$ watch -n 2 echo "τεστ - тест - copyright (c) or ©"
sh: Syntax error: "(" unexpected

$ echo "τεστ - тест - copyright (c) or ©" > testmycase
$ watch -n 2 cat testmycase

Every 2.0s: cat moofaro Sat Jan 17 18:10:41 2009

 - - copyright (c) or

$ apt-cache policy gnome-terminal procps
gnome-terminal:
  Installed: 2.24.1.1-0ubuntu1
  Candidate: 2.24.1.1-0ubuntu1
  Version table:
 *** 2.24.1.1-0ubuntu1 0
        500 http://de.archive.ubuntu.com intrepid-updates/main Packages
        100 /var/lib/dpkg/status
     2.24.1-0ubuntu1 0
        500 http://de.archive.ubuntu.com intrepid/main Packages
procps:
  Installed: 1:3.2.7-9ubuntu2.1
  Candidate: 1:3.2.7-9ubuntu2.1
  Version table:
 *** 1:3.2.7-9ubuntu2.1 0
        500 http://security.ubuntu.com intrepid-security/main Packages
        500 http://de.archive.ubuntu.com intrepid-updates/main Packages
        100 /var/lib/dpkg/status
     1:3.2.7-9ubuntu2 0
        500 http://de.archive.ubuntu.com intrepid/main Packages

Also reported here:
http://www.gp-net.nl/2008/05/22/watch-command-does-not-support-utf-8-characters/

Savvas Radevic (medigeek) wrote :

Workaround with while:
while true ; do cat testmycase; sleep 2; clear; done

description: updated
Bruno Girin (brunogirin) wrote :

Reproduced on Ubuntu 8.10 Intreprid Ibex on 17 Jan 2009

Changed in procps:
status: New → Confirmed
C de-Avillez (hggdh2) wrote :

Marking the procps Ubuntu task triaged, and rejecting the procps task.

Changed in procps:
status: New → Invalid
status: Confirmed → Triaged
importance: Undecided → Low
Changed in procps:
status: Unknown → Confirmed

Package: procps
Version: 1:3.2.8-1
Severity: normal

I execute:
watch 'ls -la Πάλλας*'

And watch shows at the header:
Every 2.0s: ls -la M-NM- M-NM-,M-NM-;M-NM-;M-NM-1M-O~B* Fri Jul 3
12:57:16 2009

Could this be fixed?

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages procps depends on:
ii libc6 2.9-12 GNU C Library: Shared libraries
ii libncurses5 5.7+20090523-1 shared libraries for
terminal hand
ii lsb-base 3.2-22 Linux Standard Base 3.2
init scrip

Versions of packages procps recommends:
ii psmisc 22.7-1 utilities that use the proc
file s

procps suggests no packages.

-- no debconf information

Jarrod Lowe (ubuntu-rrod) wrote :

I have written a patch to watch (for procps 3.2.7 and 3.2.8)

I have tried to contact the upstream, but have failed to do so - the email addresses in the man page do not seem to be read, and the mailing list contains only spam.

So, I am posting the patch here.

Jarrod Lowe (ubuntu-rrod) wrote :

...and for 3.2.8

I have written a patch for this issue.

Logged in Ubuntu: https://bugs.launchpad.net/ubuntu/+source/procps/+bug/318221

I have tried to contact the upstream, but have failed to do so - the
email addresses in the man page do not seem to be read, and the
mailing list contains only spam.

--
Jarrod Lowe

C de-Avillez (hggdh2) on 2009-11-08
tags: added: packaging
tags: removed: packaging
C de-Avillez (hggdh2) on 2009-11-08
tags: added: packaging usability
C de-Avillez (hggdh2) wrote :

looked at the 3.2.8 proposed patch. It does not apply clean.

@Jarrod: please review.

C de-Avillez (hggdh2) wrote :
Jarrod Lowe (ubuntu-rrod) wrote :

Patch (for 3.2.8) fixed up to work properly with dpatch, and the existing debian/ubuntu patches.

Jarrod Lowe (ubuntu-rrod) wrote :

Previous patch has a breakage to do with combining characters (it strips them out.)

I should have that fixed, and post an updated patch tomorrow.

Jarrod Lowe (ubuntu-rrod) wrote :

OK, fixed that.

found 240989 1:3.2.8-2
thanks

Despite the upstream changelog mentioning that umlauts are now tolerated
by watch, I can still reproduce this problem just by running

  LC_ALL=de_DE.UTF-8 watch df

Greetings, Torsten

Download full text (11.8 KiB)

tags 240989 + patch
thanks

Hi Jarrod, hi bts.

On Tue, Nov 03, 2009 at 07:24:27PM +0000, Jarrod Lowe wrote:
> I have written a patch for this issue.

I have mangled your patch into a dpatch file which applies after all other
dpatch patches included in the current Debian package. Seems to work for me,
but no guaranties...

greetings,
 Uli

diff -urN procps-3.2.8/debian/changelog procps-3.2.8~utf8/debian/changelog
--- procps-3.2.8/debian/changelog 2010-01-08 12:49:03.000000000 +0100
+++ procps-3.2.8~utf8/debian/changelog 2010-01-08 12:46:53.000000000 +0100
@@ -1,3 +1,10 @@
+procps (1:3.2.8-2.1) UNRELEASED; urgency=low
+
+ * No upload at all, not even an NMU...
+ * added watch-unicode patch by Jarrod Lowe Closes: #240989
+
+ -- Uli Martens <email address hidden> Fri, 08 Jan 2010 10:12:07 +0100
+
 procps (1:3.2.8-2) unstable; urgency=low

   * ps displays supplementary groups Closes: #506303
diff -urN procps-3.2.8/debian/control procps-3.2.8~utf8/debian/control
--- procps-3.2.8/debian/control 2010-01-08 12:49:03.000000000 +0100
+++ procps-3.2.8~utf8/debian/control 2010-01-11 09:51:30.000000000 +0100
@@ -2,7 +2,7 @@
 Section: admin
 Priority: required
 Maintainer: Craig Small <email address hidden>
-Build-Depends: debhelper (>= 7), libncurses5-dev, make (>= 3.78.1-8), dpatch
+Build-Depends: debhelper (>= 7), libncurses5-dev, libncursesw5-dev, make (>= 3.78.1-8), dpatch
 Standards-Version: 3.8.3
 Homepage: http://procps.sf.net/

diff -urN procps-3.2.8/debian/patches/00list procps-3.2.8~utf8/debian/patches/00list
--- procps-3.2.8/debian/patches/00list 2010-01-08 12:49:03.000000000 +0100
+++ procps-3.2.8~utf8/debian/patches/00list 2010-01-08 12:46:53.000000000 +0100
@@ -51,3 +51,4 @@
 55_top_highlight
 60_top_nohz
 65_fix_partition_format
+70_watch_unicode
diff -urN procps-3.2.8/debian/patches/70_watch_unicode.dpatch procps-3.2.8~utf8/debian/patches/70_watch_unicode.dpatch
--- procps-3.2.8/debian/patches/70_watch_unicode.dpatch 1970-01-01 01:00:00.000000000 +0100
+++ procps-3.2.8~utf8/debian/patches/70_watch_unicode.dpatch 2010-01-11 09:50:29.000000000 +0100
@@ -0,0 +1,301 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 70_watch-unicode.dpatch by Jarrod Lowe <email address hidden>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: add support for unicode characters
+
+@DPATCH@
+diff -urNad procps-3.2.8~/AUTHORS procps-3.2.8/AUTHORS
+--- procps-3.2.8~/AUTHORS 2010-01-08 09:55:26.000000000 +0100
++++ procps-3.2.8/AUTHORS 2010-01-08 09:59:12.000000000 +0100
+@@ -47,4 +47,5 @@
+ watch:
+ Tony Rems <email address hidden>
+ Mike Coleman <email address hidden>
++Jarrod Lowe <email address hidden>
+
+diff -urNad procps-3.2.8~/Makefile procps-3.2.8/Makefile
+--- procps-3.2.8~/Makefile 2010-01-08 09:58:52.000000000 +0100
++++ procps-3.2.8/Makefile 2010-01-08 10:00:27.000000000 +0100
+@@ -68,6 +68,7 @@
+ _TARFILES := Makefile
+
+ CURSES := -lncurses
++CURSESW := -lncursesw
+
+ # This seems about right for the dynamic library stuff.
+ # Something like this is probably needed to make the SE Linux
+@@ -119,7 +120,7 @@
+ # Unlike the kernel one, this check_gcc goes all the way to
+ # producing an executable. There might be a -m64 that works
+ # until you g...

Package: procps
Version: 1:3.2.8-3

procps 3.2.8-3 has the extra fixes so that its UTF-8 clean. escape
characters cannot be passed through as it uses ncurses.

 - Craig
--
Craig Small GnuPG:1C1B D893 1418 2AF4 45EE 95CB C76C E5AC 12CA DFA5
http://www.enc.com.au/ csmall at : enc.com.au
http://www.debian.org/ Debian GNU/Linux, software should be Free

Changed in procps (Debian):
status: Confirmed → Fix Released
David Futcher (bobbo) on 2010-06-10
tags: added: patch-forwarded-debian
David Ayers (ayers) wrote :

This still seems to be an issue for Lucid but seems to have been fixed for Maverick and Natty.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.