Not logged in
Log in now
Create an account
Subscribe to LWN
Dividing the Linux desktop
LWN.net Weekly Edition for June 13, 2013
A report from pgCon 2013
Little things that matter in language design
LWN.net Weekly Edition for June 6, 2013
PostgreSQL, OpenSSL, and the GPL
Posted Feb 16, 2011 20:40 UTC (Wed) by mbanck (subscriber, #9035)
Posted Feb 16, 2011 20:41 UTC (Wed) by sfeam (subscriber, #2841)
Calling it a "bug" isn't really correct. libedit simply doesn't have any support for UTF-8. Or wait - you could say it's a bug in the documentation; the source distribution site www.thrysoee.dk/editline/ does mention UTF-8 support, but having gone over the source code I conclude that whoever wrote that did not understand the difference between support for "wchar" fixed-length 16 bit or 32 bit encodings and support for a variable length encoding like UTF-8. libedit recently added support for the former, but I found no hint of support for the latter.
The gnuplot project has been suffering from this problem for a long time now. It would be nice to offer the option of linking to libedit (in fact we do offer that option) but it simply doesn't work in a UTF-8 or SJIS environment. This is particularly annoying because Apple ships a version of libedit with OSX that announces itself as "readline". But it isn't, so programs that autoconfigure to use readline then fail because "readline" is really "libedit".
Now I would be happy as a clam if someone can tell me otherwise, and point to source for a libedit version, buggy or not, that does really support UTF-8. Anyone?
Posted Feb 16, 2011 20:42 UTC (Wed) by rvfh (subscriber, #31018)
Posted Feb 16, 2011 20:43 UTC (Wed) by obrakmann (subscriber, #38108)
Especially since Debian seems to use a libedit from 2008 (according to the package version at least: 2.11-20080614-2), while the latest changelog entry from 2010 (on the homepage linked to from this article) says "Now with UTF-8 support"
Posted Feb 16, 2011 20:50 UTC (Wed) by mbanck (subscriber, #9035)
Posted Feb 16, 2011 22:27 UTC (Wed) by mikov (subscriber, #33179)
Posted Feb 17, 2011 5:06 UTC (Thu) by khim (subscriber, #9252)
I mean, editing a single line of text is a problem? Really? Can someone explain why?
Sure. It's easy: because this book weights over five pounds (2kg)...
Editing of a single line of US-ASCII text is easy and libedit does it acceptably well. But when you go beyond that... some characters take two positions on screen, some don't take anything at all, etc. Readline does not do it all that well, but in comparison to libedit... well, it's not so simple to edit a single line of text, believe me...
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds