Re: xterm and wcwidth()

2019-03-08 Thread Ingo Schwarze
Hi, Ted Unangst wrote on Fri, Mar 08, 2019 at 03:24:56PM -0500: > Matthieu Herrb wrote: >> I would prefer a diff that just add a &&!defined(__OpenBSD__) to the >> condition before the definition of systemWcwidthOk(). This will cause >> less risk of conflicts in future updates and clearly show the

Re: xterm and wcwidth()

2019-03-08 Thread Ted Unangst
Matthieu Herrb wrote: > I would prefer a diff that just add a &&!defined(__OpenBSD__) to the > condition before the definition of systemWcwidthOk(). This will cause > less risk of conflicts in future updates and clearly show the > intention. If you prefer that, I would suggest the following to avo

Re: xterm and wcwidth()

2019-03-08 Thread Matthieu Herrb
On Fri, Mar 08, 2019 at 02:39:32PM +0100, Ingo Schwarze wrote: > Hi, > > Lauri Tirkkonen wrote on Fri, Mar 08, 2019 at 12:43:11PM +0200: > > > I feel like xterm should just use the system wcwidth() to avoid these > > mismatches, so rudimentary diff to do that below. > > Absolutely, i strongly ag

Re: xterm and wcwidth()

2019-03-08 Thread Ingo Schwarze
Hi, Ted Unangst wrote on Fri, Mar 08, 2019 at 12:57:17PM -0500: > Lauri Tirkkonen wrote: >> in other words, xterm is (and was) using its own idea of how many >> columns characters take up. The way this manifested itself to me was >> that I received some email that contained emoji characters in th

Re: xterm and wcwidth()

2019-03-08 Thread Ted Unangst
Lauri Tirkkonen wrote: > in other words, xterm is (and was) using its own idea of how many > columns characters take up. The way this manifested itself to me was > that I received some email that contained emoji characters in the > subject, and they look fine in mutt when I use another terminal (st

Re: xterm and wcwidth()

2019-03-08 Thread Ingo Schwarze
Hi, Lauri Tirkkonen wrote on Fri, Mar 08, 2019 at 12:43:11PM +0200: > I feel like xterm should just use the system wcwidth() to avoid these > mismatches, so rudimentary diff to do that below. Absolutely, i strongly agree with that sentiment. Having a local character width table in an applicatio

xterm and wcwidth()

2019-03-08 Thread Lauri Tirkkonen
Hi, it appears xterm tests the system's wcwidth() function on startup, comparing the results between it and the wcwidth implementation it ships itself (mk_wcwidth()), for each wchar_t value between 0 and 0x. This is done in systemWcwidthOk(), called from decode_wcwidth(). I turned some TRACE(