#52866 closed defect (fixed)
libedit: unable to enter non-ASCII characters
Reported by: | raimue (Rainer Müller) | Owned by: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | Schamschula (Marius Schamschula), mww@…, larryv (Lawrence Velázquez) | |
Port: | libedit sqlite3 |
Description
The sqlite3 shell does not allow typing non-ASCII characters. To reproduce this, open sqlite3 and try to copy and paste "Müller" into a query. The umlaut will be skipped and you end up with "Mller".
This works correctly with /usr/bin/sqlite3 on macOS 10.12.1, so it is probably not an upstream problem, but in the packaging.
$ otool -L /opt/local/bin/sqlite3 /opt/local/bin/sqlite3: /opt/local/lib/libedit.0.dylib (compatibility version 1.0.0, current version 1.54.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0) $ otool -L /usr/bin/sqlite3 /usr/bin/sqlite3: /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0) /usr/lib/libsqlite3.dylib (compatibility version 9.0.0, current version 252.0.0) /usr/lib/libedit.3.dylib (compatibility version 2.0.0, current version 3.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0)
Maybe it is the missing ncurses, which is in depends_lib
, but not actually linked. Could also be a problem with --enable-readline
vs. --enable-editline
. The configure script states that the supported library is auto-detected, so one of them should be passed as --disable-*line
.
Change History (11)
comment:1 Changed 8 years ago by Schamschula (Marius Schamschula)
comment:2 Changed 8 years ago by raimue (Rainer Müller)
Cc: | MarcusCalhoun-Lopez added |
---|---|
Port: | libedit added |
Hm, it seems to be using -I/opt/local/include
with the compile command, which would contain readline/readline.h
and thus should take precedence?
That you cannot select readline is caused by the patch to the configure script that forces -ledit
to be tried before -lreadline
. And in fact, if I leave out the patch, --enable-readline --disable-editline
produces a sqlite3 that accepts wide characters.
Turns out this is in fact a issue with our libedit. The readline() compatiblity interface does not seem to accept these characters. Note that this works with the libedit provided by macOS, so I would assume it is a bug in libedit itself.
Here is a small test program with a shell sequence to test it:
$ cat > readline-test.c #include <editline/readline.h> int main() { char *line = readline("test: "); printf("%s\n", line); return 0; } $ clang -o readline-test-apple readline-test.c -ledit $ clang -I/opt/local/include -L/opt/local/lib -o readline-test-macports readline-test.c -ledit $ ./readline-test-apple test: Müller Müller $ ./readline-test-macports test: Mller Mller
comment:3 Changed 8 years ago by Schamschula (Marius Schamschula)
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 Changed 8 years ago by raimue (Rainer Müller)
Port: | sqlite3 libedit → libedit sqlite3 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Summary: | sqlite3: unable to enter non-ASCII characters → libedit: unable to enter non-ASCII characters |
Technically the problem is solved for sqlite3 with the commit, but the bug in libedit still exists and might affect other applications.
comment:5 Changed 8 years ago by raimue (Rainer Müller)
Cc: | mww@… added; MarcusCalhoun-Lopez removed |
---|---|
Owner: | changed from mww@… to MarcusCalhoun-Lopez |
Status: | reopened → assigned |
comment:6 Changed 8 years ago by larryv (Lawrence Velázquez)
Cc: | larryv added |
---|
comment:7 Changed 8 years ago by Schamschula (Marius Schamschula)
Unfortunately, the recent update to libedit @20160903-3.1_0
does not fix this issue.
comment:8 Changed 8 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The sqlite3 configure script insists on picking up
/usr/include/readline/readline.h
, which of course is for BSD editline, even when I specify--disable-editline
.Is there a standard way to force
./configure
just to look in${prefix}/include
instead?