Debian Bug report logs - #420974
xterm-225: copy-&-paste for national chars is broken

version graph

Package: xterm; Maintainer for xterm is Debian X Strike Force <debian-x@lists.debian.org>; Source for xterm is src:xterm.

Reported by: "Eugene B. Berdnikov" <bd4@protva.ru>

Date: Wed, 25 Apr 2007 15:45:01 UTC

Severity: normal

Found in versions xterm/225-1, xterm/226-1

Done: Julien Cristau <jcristau@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#420974; Package xterm. Full text and rfc822 format available.

Acknowledgement sent to "Eugene B. Berdnikov" <bd4@protva.ru>:
New Bug report received and forwarded. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: "Eugene B. Berdnikov" <bd4@protva.ru>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: xterm-225: copy-&-paste for national chars is broken
Date: Wed, 25 Apr 2007 19:40:42 +0400
Package: xterm
Version: 225-1
Severity: normal


Xterm-225-1, LANG=ru_RU.KOI8-R (cyrillic).

Cyrillic characters are substituted by hashes (#) on copy-and-paste.
Xterm 222-1etch2 works fine with cyrillic on the same system.

Symptoms:

1. "Copy" operation works on xterm-225: buffer can be successfully pasted
   to any X application, except xterm-225.

2. If cyrillic is selected on xterm-225, and just after that operation
   focus is switched to other xterm (by left-mouse-click), and then
   back to original xterm-225, then buffer contents become paste-able
   to xterm-225, but not to any other X application.


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

Kernel: Linux 2.6.18-4-686 (SMP w/1 CPU core)
Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.KOI8-R (charmap=KOI8-R)
Shell: /bin/sh linked to /bin/bash

Versions of packages xterm depends on:
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  libfontconfig1              2.4.2-1.2    generic font configuration library
ii  libice6                     1:1.0.3-2    X11 Inter-Client Exchange library
ii  libncurses5                 5.5-5        Shared libraries for terminal hand
ii  libsm6                      1:1.0.2-2    X11 Session Management library
ii  libx11-6                    2:1.0.3-7    X11 client-side library
ii  libxaw7                     1:1.0.2-4    X11 Athena Widget library
ii  libxext6                    1:1.0.1-2    X11 miscellaneous extension librar
ii  libxft2                     2.1.12-2     FreeType-based font drawing librar
ii  libxmu6                     1:1.0.2-2    X11 miscellaneous utility library
ii  libxt6                      1:1.0.5-2    X11 toolkit intrinsics library
ii  xbitmaps                    1.0.1-2      Base X bitmaps

Versions of packages xterm recommends:
ii  xutils                      1:7.1.ds.3-1 X Window System utility programs

-- no debconf information




Message sent on to "Eugene B. Berdnikov" <bd4@protva.ru>:
Bug#420974. Full text and rfc822 format available.

Message #8 received at 420974-submitter@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@radix.net>
To: 420974-submitter@bugs.debian.org
Subject: Re: Bug#420974: xterm-225: copy-&-paste for national chars is broken
Date: Thu, 26 Apr 2007 15:28:52 -0400
[Message part 1 (text/plain, inline)]
On Wed, Apr 25, 2007 at 05:50:15PM +0200, Eugene B. Berdnikov wrote:
> Package: xterm
> Version: 225-1
> Severity: normal
> 
> 
> Xterm-225-1, LANG=ru_RU.KOI8-R (cyrillic).

Is this using koi8rxterm?
I'm checking if the -k8 option is used, or allowC1Printable resource set.

> Cyrillic characters are substituted by hashes (#) on copy-and-paste.
> Xterm 222-1etch2 works fine with cyrillic on the same system.
> 
> Symptoms:
> 
> 1. "Copy" operation works on xterm-225: buffer can be successfully pasted
>    to any X application, except xterm-225.
> 
> 2. If cyrillic is selected on xterm-225, and just after that operation
>    focus is switched to other xterm (by left-mouse-click), and then
>    back to original xterm-225, then buffer contents become paste-able
>    to xterm-225, but not to any other X application.

thanks for the report (I can reproduce this, and will work on the fix now).

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#420974; Package xterm. Full text and rfc822 format available.

Acknowledgement sent to Thomas Dickey <dickey@radix.net>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. Full text and rfc822 format available.

Message #13 received at 420974@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@radix.net>
To: 420974@bugs.debian.org
Cc: 420974-submitter@bugs.debian.org
Subject: Re: Bug#420974: xterm-225: copy-&-paste for national chars is broken
Date: Thu, 26 Apr 2007 19:01:08 -0400
[Message part 1 (text/plain, inline)]
On Wed, Apr 25, 2007 at 05:50:15PM +0200, Eugene B. Berdnikov wrote:
> Package: xterm
> Version: 225-1
> Severity: normal
> 
> 
> Xterm-225-1, LANG=ru_RU.KOI8-R (cyrillic).
> 
> Cyrillic characters are substituted by hashes (#) on copy-and-paste.
> Xterm 222-1etch2 works fine with cyrillic on the same system.

This seems to be the simplest fix:

diff -u -r1.272 button.c
--- button.c    2007/03/19 23:42:48     1.272 
+++ button.c    2007/04/26 22:56:56 
@@ -1611,7 +1611,8 @@ 
            GettingSelection(dpy, *type, line, *length);

 #if OPT_WIDE_CHARS
-           if (*type == XA_UTF8_STRING(dpy)) { 
+           if (*type == XA_UTF8_STRING(dpy) && 
+               !(screen->wide_chars || screen->c1_printable)) { 
                rc = Xutf8TextPropertyToTextList(dpy, &text_prop,
                                                 &text_list, &text_list_count);
                if (text_list != NULL && text_list_count != 0) {


-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
[Message part 2 (application/pgp-signature, inline)]

Message sent on to "Eugene B. Berdnikov" <bd4@protva.ru>:
Bug#420974. Full text and rfc822 format available.

Reply sent to Julien Cristau <jcristau@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to "Eugene B. Berdnikov" <bd4@protva.ru>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #21 received at 420974-close@bugs.debian.org (full text, mbox):

From: Julien Cristau <jcristau@debian.org>
To: 420974-close@bugs.debian.org
Subject: Bug#420974: fixed in xterm 226-1
Date: Mon, 18 Jun 2007 13:47:09 +0000
Source: xterm
Source-Version: 226-1

We believe that the bug you reported is fixed in the latest version of
xterm, which is due to be installed in the Debian FTP archive:

xterm_226-1.diff.gz
  to pool/main/x/xterm/xterm_226-1.diff.gz
xterm_226-1.dsc
  to pool/main/x/xterm/xterm_226-1.dsc
xterm_226-1_i386.deb
  to pool/main/x/xterm/xterm_226-1_i386.deb
xterm_226.orig.tar.gz
  to pool/main/x/xterm/xterm_226.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 420974@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Julien Cristau <jcristau@debian.org> (supplier of updated xterm package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 18 Jun 2007 14:02:22 +0100
Source: xterm
Binary: xterm
Architecture: source i386
Version: 226-1
Distribution: unstable
Urgency: low
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Changed-By: Julien Cristau <jcristau@debian.org>
Description: 
 xterm      - X terminal emulator
Closes: 12261 349142 418324 420974 421523 422521 426364 426863
Changes: 
 xterm (226-1) unstable; urgency=low
 .
   [ Branden Robinson ]
   * Remove debian/NEWS; the events it attested to (like the "upcoming 7.0
     modularization" are no longer news, and are in the past.
 .
   [ Julien Cristau ]
   * Configure with --with-tty-group=tty, to prevent security problems in case
     of buggy build environment (closes: #349142).
   * New upstream release.
     + fix  an  infinite  loop  when  showing  a  2-column character in a
       1-column screen (closes: #426863).
     + add  XF86Paste  and  SunPaste  to the default translations
       (closes: #422521, patch by Bernhard R Link).
     + improve  permissions  logic  when  closing pseudo-terminal
       (closes: #12261, patch by Nathanael Nerode, analysis by Richard
       Braakman).
     + add  a check in case someone tries to call the popup-menu() action
       on a menu which is not initialized (closes: #426364).
     + fix error-checking on internal font switching for "Selection" menu
       entry (closes: #421523).
     + amend select/paste change from patch #225 by limiting it to
       non-UTF-8/non-KOI8-R encoding (closes: #420974).
     + add  workaround  for  groff  ".URL" codes which are not present in
       some commonly-used bitmap fonts (closes: #418324).
   * Update reference to xlibs-data in xterm's description, refer to xbitmaps
     instead.
   * Build-depend on desktop-file-utils to install the new desktop files for
     xterm and uxterm, and change debian/rules and debian/xterm.install to
     install these files and the icons.
Files: 
 104129b8aabcf3498c64be24716de973 825 x11 optional xterm_226-1.dsc
 93d1f43ac3c13af86c598493f14a36f6 835862 x11 optional xterm_226.orig.tar.gz
 57ae2778e0a806deb01a41cc6fee0292 61616 x11 optional xterm_226-1.diff.gz
 94f81ecbb70c7cf120552b2a5a4bdeb2 452080 x11 optional xterm_226-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGdovGmEvTgKxfcAwRAhbbAKCEL0Aq2kLgqYfTaeThWox3p9KYNwCePjvT
hGOcCnN7IKcs8dgUyCxOLVc=
=U44l
-----END PGP SIGNATURE-----




Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#420974; Package xterm. Full text and rfc822 format available.

Acknowledgement sent to Yauhen Kharuzhy <jekhor@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. Full text and rfc822 format available.

Message #26 received at 420974@bugs.debian.org (full text, mbox):

From: Yauhen Kharuzhy <jekhor@gmail.com>
To: Debian Bug Tracking System <420974@bugs.debian.org>
Subject: xterm: Bug is not fixed, because KOI8-R is not only one cyrillic charset.
Date: Fri, 29 Jun 2007 20:52:44 +0300
Package: xterm
Version: 226-1
Followup-For: Bug #420974


I use locales ru_RU.CP1251 and be_BY.CP1251, CP1251 is another cyrillic
charset, and this bug still exists for me and many users from ex-USSR.
Additionaly, another one-byte charsets exist, not only for cyrillic
symbols, and fixing this bug for KOI8-R users only is error.

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

Kernel: Linux 2.6.19 (SMP w/1 CPU core)
Locale: LANG=be_BY.CP1251, LC_CTYPE=be_BY.CP1251 (charmap=CP1251)
Shell: /bin/sh linked to /bin/bash

Versions of packages xterm depends on:
ii  libc6                         2.5-11     GNU C Library: Shared libraries
ii  libfontconfig1                2.4.2-1.2  generic font configuration library
ii  libice6                       1:1.0.3-2  X11 Inter-Client Exchange library
ii  libncurses5                   5.6-3      Shared libraries for terminal hand
ii  libsm6                        2:1.0.3-1  X11 Session Management library
ii  libx11-6                      2:1.0.3-7  X11 client-side library
ii  libxaw7                       1:1.0.3-3  X11 Athena Widget library
ii  libxext6                      1:1.0.3-2  X11 miscellaneous extension librar
ii  libxft2                       2.1.12-2   FreeType-based font drawing librar
ii  libxmu6                       1:1.0.3-1  X11 miscellaneous utility library
ii  libxt6                        1:1.0.5-3  X11 toolkit intrinsics library
ii  xbitmaps                      1.0.1-2    Base X bitmaps

Versions of packages xterm recommends:
ii  xutils                      1:7.1.ds.3-1 X Window System utility programs

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#420974; Package xterm. Full text and rfc822 format available.

Acknowledgement sent to Thomas Dickey <dickey@radix.net>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. Full text and rfc822 format available.

Message #31 received at 420974@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@radix.net>
To: Yauhen Kharuzhy <jekhor@gmail.com>, 420974@bugs.debian.org
Subject: Re: Bug#420974: xterm: Bug is not fixed, because KOI8-R is not only one cyrillic charset.
Date: Fri, 29 Jun 2007 15:07:20 -0400
[Message part 1 (text/plain, inline)]
On Fri, Jun 29, 2007 at 08:00:15PM +0200, Yauhen Kharuzhy wrote:
> Package: xterm
> Version: 226-1
> Followup-For: Bug #420974
> 
> 
> I use locales ru_RU.CP1251 and be_BY.CP1251, CP1251 is another cyrillic
> charset, and this bug still exists for me and many users from ex-USSR.
> Additionaly, another one-byte charsets exist, not only for cyrillic
> symbols, and fixing this bug for KOI8-R users only is error.

iirc, all of those use printable C1 (128-159 codes), so the fix noted in
the changes should apply:

     * amend select/paste change from patch #225 by limiting it to
       non-UTF-8/non-KOI8-R encoding (Debian #420974).
 
since the internal check for the "non-KOI8-R" only checks if the
allowC1Printable resource is set (the "-k8" option).

Here's the related chunk in xterm's button.c:

@@ -1611,7 +1611,8 @@
            GettingSelection(dpy, *type, line, *length);

 #if OPT_WIDE_CHARS
-           if (*type == XA_UTF8_STRING(dpy)) {
+           if (*type == XA_UTF8_STRING(dpy) &&
+               !(screen->wide_chars || screen->c1_printable)) {
                rc = Xutf8TextPropertyToTextList(dpy, &text_prop,
                                                 &text_list, &text_list_count);
                if (text_list != NULL && text_list_count != 0) {

Some KOI8-R users don't use the option, but that's never been supported.

p.s: before reporting a bug not fixed, try testing it.

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
[Message part 2 (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 28 Jul 2007 07:31:24 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 02:40:32 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.