Hi Steffen, Steffen Nurpmeso wrote on Wed, Dec 23, 2015 at 11:45:36AM +0100: > Ingo Schwarze <schwa...@usta.de> wrote:
>> For example, colrm(1). >> >> 4. The backspace character (U+0008) backs up by one display position >> rather than by one character. That causes miscounting when >> backspace follows a zero-width or double-width character. > this however is unfortunately common behaviour for terminals, too. Sure, i noticed that in xterm(1) during testing. I neither said that all other software is perfect, nor that mixing backspace encoding with UTF-8 is particularly robust this season. I'm just trying to improve colrm(1) here. Note that making backspace back up by one character is not making anything worse. Sure, xterm(1) displays it badly, but some other programs, for example less(1), already implement the better semantics. So changing additional utilities to also use the better semantics makes the system better and more constistent overall. Telling people to add TWO backpaces after a double width character to please xterm(1) would not be reasonable. It breaks less(1) in an even worse way then using one backspace breaks xterm(1). And then we would have to change less(1) and mandoc(1) and groff(1) and probably more programs, people would have to change their files, and we would have a more awkward and more complicated semantics. So, remember this rule: +----------------------------------------------------------------+ | Backspace removes the previous character, no matter its width. | +--------++--------------------------------------------++--------+ || || || || Yours, Ingo