Alignment of hardstatus with unicode characters
Tom Haddon <[email protected]> Sun, 8 Feb 2026 12:06:52 +0100
| Newsgroups | gmane.comp.gnu.screen.user |
|---|---|
| Message-ID | <CAKECCw4E8eR8G8XKo+2EP2GgmVSVYVNYkn0ay02YAemS+tiETg@mail.gmail.com> |
--000000000000aab912064a4e05ae Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, I'm not sure if this is a bug or not, or something I'm doing incorrectly, but I'm trying to set my hardstatus line to include some unicode characters, but when I do, alignment doesn't seem to work correctly (presumably due to incorrect calculation of the width of the unicode characters). I've grabbed a copy of the source code at https://git.savannah.gnu.org/git/screen.git and the latest commit ID is 9d8b0ff3901bdcb8d3bc05d94fce2ef987562768. I've compiled this locally, and am then running screen with the following config: ``` hardstatus alwayslastline hardstatus string '%H %=3D =C2=B1' ``` What I see in my hardstatus line is this: ``` finistere =EF=BF= =BD ``` I'm trying to reproduce something I'm seeing - in that case I'm calling backtick commands that include unicode characters in the output. In that case they are displayed, but not correctly right aligned (there are a number of spaces to the right of what's supposed to be the last character). I'm hoping if I can solve why the simple case above fails it will also work for my actual use case. Thanks, Tom --000000000000aab912064a4e05ae Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hello,<div><br></div><div>I'm not sure if this is a bu= g or not, or something I'm doing incorrectly, but I'm trying to set= my hardstatus line to include some unicode characters, but when I do, alig= nment doesn't seem to work correctly (presumably due to incorrect calcu= lation of the width of the unicode characters).</div><div><br></div><div>I&= #39;ve grabbed a copy of the source code at=C2=A0<a href=3D"https://git.sav= annah.gnu.org/git/screen.git">https://git.savannah.gnu.org/git/screen.git</= a> and the latest commit ID is=C2=A09d8b0ff3901bdcb8d3bc05d94fce2ef98756276= 8. I've compiled this locally, and am then running screen with the foll= owing config:</div><div><br></div><div>```</div><div>hardstatus alwayslastl= ine</div><div>hardstatus string '%H %=3D=C2=A0=C2=B1'</div><div>```= </div><div>What I see in my hardstatus line is this:</div><div>```</div><di= v>finistere =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =EF=BF=BD</div><div>```</div><div><br></div><div>I'm trying to reproduc= e something I'm seeing - in that case I'm calling backtick commands= that include unicode characters in the output. In that case they are displ= ayed, but not correctly right aligned (there are a number of spaces to the = right of what's supposed to be the last character). I'm hoping if I= can solve why the simple case above fails it will also work for my actual = use case.</div><div><br></div><div>Thanks, Tom</div></div> --000000000000aab912064a4e05ae--