Randy McMurchy wrote:
> ========================================================================
> Caution
> 
> Ed determines character boundaries incorrectly in multibyte locales. See
> the Breaks Multibyte Characters section of the Locale Related Issues
> page for a more general discussion of this problem. Use of Ed in
> installation instructions for BLFS packages such as teTeX-3.0 is not a
> problem, as BLFS instructions never use Ed to modify a file containing
> non-ASCII characters.
> ========================================================================

Debian has fixed it even for ed-0.2 by the following patch that switches 
from internal regex implementation to glibc functions:

--- ed-0.2.orig/Makefile.in
+++ ed-0.2/Makefile.in
@@ -65,8 +65,8 @@

  all: ed

-ed: $(OBJECTS) libed.a
-       $(CC) $(LDFLAGS) -o ed $(OBJECTS) libed.a $(LIBS)
+ed: $(OBJECTS)
+       $(CC) $(LDFLAGS) -o ed $(OBJECTS) $(LIBS)

  buf.o: ed.h config.h regex.h
  ed.o: ed.h config.h regex.h

In ed-0.6, the problem doesn't exist. Here is the testcase (to be run in any 
UTF-8 based locale):

$ ./ed
a
абвг
.
s/./!/g
p
!!!!    # in a buggy ed, you'll see 8 exclamation marks instead of 4
Q

-- 
Alexander E. Patrakov
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to