Re: [dev] [st] Erasing UTF-8 characters in ed

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Tue, 5 Aug 2014 12:24:41 +0200

> This is even more strange. If I run t from dwm shortcut:
>
> static const char *termcmd[] = { "/usr/local/bin/st", "-e", "utmp", NULL };
>
> when I try to put a non ascii leter I get them in latin1 encode. If
> I try running /usr/local/bin/st -e /usr/local/bin/utmp from command
> line (from a st terminal opened with dwm) I get them in utf8
> encode. If I execute xterm from dmenu shortcut of dwm I get

I have tested in linux and I cannot reproduce this behaviour, so
there is some interaction between OpenBSD and dwm here. Can someone else
test this problem?

> If I execute ed without the here document (again in command line
> execution).
>
> $ stty erase ^H
> $ touch f.txt
> $ ed f.txt
> 0
> a
>
> .
> w
> 2
> q
> $ hexdump f.txt
> 0000000 0ac3
> 0000002
> $

This is the output that I get in linux with -iutf8. If I do a
stty iutf8, then the output is correct. I think this is a good
topic for the FAQ.

Regards,

-- 
Roberto E. Vargas Caballero
Received on Tue Aug 05 2014 - 12:24:41 CEST

This archive was generated by hypermail 2.3.0 : Tue Aug 05 2014 - 12:36:06 CEST