1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00
guile/guile-readline
Michael Gran 7519234547 Fix broken interaction between readline and Unicode
This requires separate small fixes.

Readline has internal logic to deal with multi-byte characters, so
it wants bytes, not characters.

scm_c_read gets called by the vm when readline is activated, and it was
truncating multi-byte characters because soft ports didn't have the
UCS-4 capability.

Soft ports need the capability to read UCS-4 characters.  Since soft ports
may have a single byte buffer, full characters need to be stored into the
pushback buffer.

This broke the optimizations in scm_c_read for using an alternate buffer
for single-byte-buffered ports, because the opimization wasn't expecting
anything in the pushback buffer.

* libguile/vports.c (sf_fill_input): store complete chars, not single bytes

* libguile/ports.c (scm_c_read): don't use optimized path for non Latin-1.
  Add debug prints.

* libguile/string.h: make scm_i_from_stringn and scm_i_string_ref public
  so that readline can use them

* guile-readline/readline.c: read bytes, not complete chars, from the
  input port.  Convert output to the output port's locale
2009-09-07 19:12:34 -07:00
..
ice-9 Export readline history functions 2009-08-30 11:03:34 +01:00
ChangeLog-2008 Rename ChangeLog' files to ChangeLog-2008'. 2008-09-12 21:49:58 +02:00
LIBGUILEREADLINE-VERSION Bumped versions for 1.9 series. 2006-02-05 22:57:57 +00:00
Makefile.am Aggregate `guile-readline' makefiles. 2009-08-21 01:49:42 +02:00
readline-activator.scm * readline-activator.scm (activate-readline): Report an error if 2000-06-06 12:41:48 +00:00
readline.c Fix broken interaction between readline and Unicode 2009-09-07 19:12:34 -07:00
readline.h Change guile-readline license to GPLv3+ 2009-06-17 22:35:30 +01:00