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

From: Alexandre Niveau <>
Date: Mon, 04 Aug 2014 04:13:36 +0200


On 24/07/2014 23:52, Roberto E. Vargas Caballero wrote:
> Well, let me think. You press Backspace key (which generates ^H), and your
> configuration of stty says that erase is ^H, but then it seems that it is
> deleted only the last byte of the previous utf8 rune. This action is
> performed by the kernel, so the first thing we have to discard is a
> problem related with locales.

After fiddling with st's code for some time, I finally realized that the
problem could come from the way the tty was configured… And indeed, the
command “stty iutf8” solved the problem.

I hadn't thought of this because there was no such problem in the other
terminals I tried — and for good reason: they have “stty iutf8” on by
default! Couldn't st behave the same?

I hope this could actually be useful for others. If it's not possible to
have st automatically tell stty to use the iutf8 mode, then maybe it's
worth a mention in the FAQ.

-- A.N.
Received on Mon Aug 04 2014 - 04:13:36 CEST

This archive was generated by hypermail 2.3.0 : Mon Aug 04 2014 - 04:24:07 CEST