libedit lacks utf-8 support

Bug #816758 reported by Fred on 2011-07-27
36
This bug affects 5 people
Affects Status Importance Assigned to Milestone
libedit (Debian)
Fix Released
Unknown
libedit (Ubuntu)
Wishlist
Unassigned
php5 (Ubuntu)
Undecided
Unassigned

Bug Description

php5-cli have a Readline extension.
http://php.net/readline

PHP on Ubuntu is compiled using the libedit library instead of GNU Readline.

readline() wont accept some characters such as åäö.
Test case: $ php -r "readline('>');"

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: php5-cli 5.3.5-1ubuntu7.2
ProcVersionSignature: Ubuntu 2.6.38-10.46-generic 2.6.38.7
Uname: Linux 2.6.38-10-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
CheckboxSubmission: 8b5778459c1f0a1989b8d1d888befce0
CheckboxSystem: 4ed15c40009aa6f7770f606350a390a2
Date: Wed Jul 27 03:18:24 2011
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
 LANGUAGE=en
 LANG=en_US.UTF-8
 LC_MESSAGES=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: php5
UpgradeStatus: Upgraded to natty on 2011-03-28 (120 days ago)

Fred (eldmannen+launchpad) wrote :
description: updated
Clint Byrum (clint-fewbar) wrote :

Hi Fred! Thanks for taking the time to file this bug in Ubuntu. This would appear to be a problem with libedit, not PHP, so I'm reassigning it as such. Its likely that adding UTF-8 functionality to libedit is a new feature, so setting importance to Wishlist.

affects: php5 (Ubuntu) → libedit (Ubuntu)
Changed in libedit (Ubuntu):
importance: Undecided → Wishlist
Ondřej Surý (ondrej) wrote :

And just to clarify why libedit... the GNU Readline is licensed under a GNU GPL (not LGPL) and hence can be used only in GPL licensed programs. Thus PHP can be compiled with libreadline, but resulting binary cannot be legally distributed.

Fred (eldmannen+launchpad) wrote :

Ah, okay, thanks.

I think that Canonical should contact GNU readline and suggest/encourage/propose/request a license change or it to be additionally dual-licensed under the LGPL.

I also think that they should do the same for PHP and suggest they get rid of their vanity license and use an established equal license such as the Apache License or Mozilla Public License.

Fred (eldmannen+launchpad) wrote :

http://www.thrysoee.dk/editline/

The page says UTF-8 support was added since version 0:35.
Needs to be enabled with 'configure --enable-widec'.

Clint Byrum (clint-fewbar) wrote :

Fred, thats good news. It seems there is already a Debian bug open about packaging that new version, which I'll link.

Its highly unlikely FSF will re-license readline. It very specifically has a GPL license so as to encourage software authors to use the GPL.

I see no issue at all with the php package.. libedit is really the only piece of software preventing you from entering the characters. So, marking the php5 task as Invalid.

Changed in php5 (Ubuntu):
status: New → Invalid
Changed in libedit (Ubuntu):
status: New → Triaged
summary: - Cant type some characters in readline()
+ libedit lacks utf-8 support
Changed in libedit (Debian):
status: Unknown → New
linas (linasvepstas) wrote :

Yes, it would be excellent if the UTF8 patches for editline were picked up, per comment #5 above.

I'm the maintainer for link-grammar (a natural-language parser; many users, the abiword word processor) and I need editline, not readline, for license reasons. I noticed recently that cut-n-paste of Russian utf-8 text doesn't work with the current editline in Ubuntu precise.

So I really would like to get the utf8 support out into the world, asap.

linas (linasvepstas) wrote :

anyway, would be great if this got a priority/importance higher than "wishlist".

Changed in libedit (Debian):
status: New → Fix Committed
Changed in libedit (Debian):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libedit - 3.1-20140213-1

---------------
libedit (3.1-20140213-1) unstable; urgency=medium

  * Upload to unstable

 -- Sylvestre Ledru <email address hidden> Wed, 12 Mar 2014 15:19:30 +0100

Changed in libedit (Ubuntu):
status: Triaged → Fix Released
Fred (eldmannen+launchpad) wrote :

I cannot find this in trusty or trusty-proposed. :(

Clint Byrum (clint-fewbar) wrote :

Fred, it is fixed in utopic. I have not evaluated the patch that fixes it, but it may be appropriate for SRU:

https://wiki.ubuntu.com/StableReleaseUpdates

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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