please add the UTF-8 patch for xsel

Bug #133096 reported by Peter Meiser
2
Affects Status Importance Assigned to Milestone
xsel (Debian)
Fix Released
Unknown
xsel (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

Binary package hint: xsel

Hi,

there's an old bug report at the Debian bug tracker (#231413) which adds UTF-8 support.
I tested it here and it works fine. Could we add it to the package?

Thanks in advance,
Whoopie

Related branches

Revision history for this message
In , Sergey Kogan (kogan-sklad) wrote : xsel: Xsel UTF-8 support patch

Package: xsel
Version: 0.9.6-1
Followup-For: Bug #231413

Xsel doesn't support XA_UTF8_STRING selection target when retrieving or
setting selections. Attached is a quick patch to make xsel
UTF8_STRING-enabled. Please note that this patch is not 100% correct.
With this patch applied, xsel will always ask other applications for
XA_UTF8_STRING instead of XA_STRING. Thus it could fail to communicate
selection with applications not aware of UTF8_STRING selection target.
Hovever, most of today programs (e.g. xterm, mozilla) handle
UTF8_STRING just fine, so this patch will probably work for you.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.4.29
Locale: LANG=ru_RU.koi8r, LC_CTYPE=ru_RU.koi8r (charmap=KOI8-R)

Versions of packages xsel depends on:
ii libc6 2.3.5-6 GNU C Library: Shared libraries an
ii xlibs 4.3.0-5 X Window System client libraries m

xsel recommends no packages.

-- no debconf information

Revision history for this message
In , Thomas Dickey (dickey) wrote : Re: Bug#231413: xsel: Xsel UTF-8 support patch

On Tue, Oct 25, 2005 at 05:20:04AM +0200, Sergey Kogan wrote:
> Package: xsel
> Version: 0.9.6-1
> Followup-For: Bug #231413
>
> Xsel doesn't support XA_UTF8_STRING selection target when retrieving or
> setting selections. Attached is a quick patch to make xsel
> UTF8_STRING-enabled. Please note that this patch is not 100% correct.
> With this patch applied, xsel will always ask other applications for
> XA_UTF8_STRING instead of XA_STRING. Thus it could fail to communicate
> selection with applications not aware of UTF8_STRING selection target.
> Hovever, most of today programs (e.g. xterm, mozilla) handle
> UTF8_STRING just fine, so this patch will probably work for you.

On the other hand, UTF8_STRING is an extension that won't work with other
platforms. I'd rather have a utility that works more than "most" of the
time.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

Revision history for this message
In , Sergey Kogan (kogan-sklad) wrote : xsel: UTF-8 handling - final patch

Package: xsel
Version: 0.9.6-1
Followup-For: Bug #231413

Here is a second version of the patch. This adds UTF8 support without
breaking things. New command-line option (-u|--utf8) switches between
XA_STRING and UTF8_STRING selection targets. When UTF8_STRING is not
supported by X-server, xsel falls back to XA_STRING.

Please note, this patch also fixes #203925 (manpage bug).

Thanks for advice and testing to Thomas Dickey <email address hidden>.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.4.29
Locale: LANG=ru_RU.koi8r, LC_CTYPE=ru_RU.koi8r (charmap=KOI8-R)

Versions of packages xsel depends on:
ii libc6 2.3.5-6 GNU C Library: Shared libraries an
ii libice6 4.3.0.dfsg.1-12.0.1 Inter-Client Exchange library
ii libsm6 4.3.0.dfsg.1-12.0.1 X Window System Session Management
ii libx11-6 4.3.0.dfsg.1-12.0.1 X Window System protocol client li
ii libxext6 4.3.0.dfsg.1-12.0.1 X Window System miscellaneous exte
ii xlibs 6.8.2.dfsg.1-7 X Window System client libraries m

xsel recommends no packages.

-- no debconf information

Revision history for this message
Peter Meiser (meiser79) wrote :

Binary package hint: xsel

Hi,

there's an old bug report at the Debian bug tracker (#231413) which adds UTF-8 support.
I tested it here and it works fine. Could we add it to the package?

Thanks in advance,
Whoopie

Revision history for this message
Peter Meiser (meiser79) wrote :

here's the UTF-8 patch. I fixed a small typo in the man page patch.

Changed in xsel:
status: Unknown → New
Revision history for this message
Andrea Veri (av) wrote :

Uploaded. Thanks for reporting this useful patch.

Changed in xsel:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Andrea Veri (av) wrote :

xsel (0.9.6-1.1ubuntu2) gutsy; urgency=low

    * debian/rules: adding dpatch support
    * debian/control: adding dpatch as B-D
    * 01_UTF-8_support.dpatch: UTF-8 support added to xsel.
      Original patch can be found on debian BTS (bug #231413),
      inactive since october 2005. Thanks to Whoopie for the
      report on launchpad and for the typo fix on manpage patch. (LP: #133096)

 -- Andrea Veri <email address hidden> Sat, 29 Sep 2007 12:36:13 +0200

Changed in xsel:
status: Confirmed → Fix Released
Revision history for this message
In , Joe Nahmias (jello) wrote : xsel bugs

tags 203925 + pending
tags 231413 + confirmed upstream

Changed in xsel:
status: New → Confirmed
Revision history for this message
In , Conrad Parker (kfish) wrote : patch committed upstream

Hi,

I've committed this patch for UTF-8 support to http://svn.kfish.org/xsel/trunk

Details at http://trac.kfish.org/changeset/192

cheers,

Conrad.

Changed in xsel:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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